-
Notifications
You must be signed in to change notification settings - Fork 54
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
Manual-execute-gas-overrides #1256
Manual-execute-gas-overrides #1256
Conversation
LCOV of commit
|
…s used in execute function
… CCIP-2950 gassnapshots fixes after EVM2EVMOffRamp contract enhancements
} | ||
} | ||
|
||
// CCIP-2950 create a new object for evm_2_evm_offramp.EVM2EVMOffRampGasLimitOverride |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a TODO? If so, please add TODO so it's tracked
for (uint256 i = 0; i < messages.length; ++i) { | ||
gasLimits[i] = messages[i].gasLimit; | ||
gasLimitOverrides[i].receiverExecutionGasLimit = messages[i].gasLimit; | ||
//create an array for destinationGasAmounts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't add comments that just say what the next line does without adding more information than the line would have given
…-overrides # Conflicts: # contracts/gas-snapshots/ccip.gas-snapshot # contracts/src/v0.8/ccip/offRamp/EVM2EVMOffRamp.sol # core/gethwrappers/ccip/generated/evm_2_evm_offramp/evm_2_evm_offramp.go # core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt
@@ -8,7 +8,7 @@ echo " └─────────────────────── | |||
|
|||
SOLC_VERSION="0.8.24" | |||
OPTIMIZE_RUNS=26000 | |||
OPTIMIZE_RUNS_OFFRAMP=22000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed due to space issues
@@ -292,8 +329,11 @@ contract EVM2EVMOffRamp is IAny2EVMOffRamp, AggregateRateLimiter, ITypeAndVersio | |||
emit SkippedAlreadyExecutedMessage(message.sequenceNumber); | |||
continue; | |||
} | |||
uint32[] memory tokenGasOverrides; | |||
bool manualExecution = manualExecGasLimits.length != 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this moved into the loop, is it cheaper this way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't change much but moved outside as it saves a tiny bit
Quality Gate passedIssues Measures |
currently, gas amounts are placed in the SourceTokenData. However, for the multi-ramps, the token data should be chain-family agnostic, which will likely require the destGasAmount lift to another field - add a new Struct which holds the receiverExecutionGasLimit and transferGasAmounts ```js struct GasLimitOverride { uint256 receiverExecutionGasLimit; uint256[] tokenGasOverrides; } ``` - `tokenGasOverrides` is an array of GasLimits to be used during the `relaseOrMint` call for the specific tokenPool associated with token --------- Signed-off-by: 0xsuryansh <suryansh.shrivastava@smartcontract.com> Co-authored-by: app-token-issuer-infra-releng[bot] <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com> Co-authored-by: 0xsuryansh <suryansh.shrivastava@smartcontract.com> Co-authored-by: Rens Rooimans <github@rensrooimans.nl>
Motivation
currently, gas amounts are placed in the SourceTokenData. However, for the multi-ramps, the token data should be chain-family agnostic, which will likely require the destGasAmount lift to another field
Solution
tokenGasOverrides
is an array of GasLimits to be used during therelaseOrMint
call for the specific tokenPool associated with token