Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocr3 - performance optimize msghasher #1115

Merged
merged 3 commits into from
Jun 28, 2024
Merged

Conversation

dimkouv
Copy link
Contributor

@dimkouv dimkouv commented Jun 28, 2024

Performance optimizations of msgHasher, ~4 times faster by parsing ABIs once.

@dimkouv dimkouv requested a review from a team as a code owner June 28, 2024 09:31
Comment on lines +41 to +51
tokensAbi: mustParseInputsAbi(`[{"components": [{"name":"token","type":"address"},
{"name":"amount","type":"uint256"}], "type":"tuple[]"}]`),
fixedSizeValuesAbi: mustParseInputsAbi(`[{"name": "sender", "type":"address"},
{"name": "receiver", "type":"address"},
{"name": "sequenceNumber", "type":"uint64"},
{"name": "gasLimit", "type":"uint256"},
{"name": "strict", "type":"bool"},
{"name": "nonce", "type":"uint64"},
{"name": "feeToken","type": "address"},
{"name": "feeTokenAmount","type": "uint256"}]`),
packedValuesAbi: mustParseInputsAbi(`[{"name": "leafDomainSeparator","type":"bytes32"},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you reference the solidity code where these types are defined?

@dimkouv dimkouv changed the title performance optimize msghasher ocr3 - performance optimize msghasher Jun 28, 2024
@dimkouv dimkouv enabled auto-merge (squash) June 28, 2024 12:05
@dimkouv dimkouv merged commit 8cf4caa into ccip-develop Jun 28, 2024
104 checks passed
@dimkouv dimkouv deleted the dk/perf-optimize-msghasher branch June 28, 2024 12:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants