[NONEVM-6030] [OffRamp] Make MIN_GASLIMIT and MIN_TT_GASLIMIT part of the dynamic config - #880
Conversation
14fe01f to
63f11ff
Compare
63f11ff to
e6c0675
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The configured token-transfer floors are below the LockRelease pool’s 0.2 TON deployment requirement, and malformed amounts can panic deployment.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Adds minGasLimit and minTTGasLimit to OffRamp dynamic configuration, updating storage, bindings, deployment setup, wrappers, and tests.
Changes:
- Introduces nested static/dynamic OffRamp configuration.
- Updates serialization, getters, dynamic-config messages, and migrations.
- Adds deployment defaults and test coverage.
File summaries
| File | Description |
|---|---|
pkg/ccip/model/offramp.go |
Updates OffRamp model and builders. |
pkg/ccip/chainaccessor/config.go |
Reads nested configuration. |
pkg/ccip/bindings/offramp/reader.go |
Decodes nested getter output. |
pkg/ccip/bindings/offramp/offramp.go |
Updates Go TLB bindings. |
integration-tests/model/offramp_test.go |
Tests new configuration fields. |
integration-tests/deployment/ccip/cs_test.go |
Updates deployment assertions. |
integration-tests/deployment/ccip/cs_deployer_test.go |
Updates deployer assertions. |
integration-tests/deployment/ccip/cs_add_lanes_test.go |
Updates lane assertions. |
deployment/ccip/sequence/deploy_ccip.go |
Initializes dynamic gas limits. |
deployment/ccip/cs_test_helpers.go |
Configures test gas limits. |
deployment/ccip/config/deploy.go |
Adds OffRamp parameters and validation. |
deployment/ccip/config/chain.go |
Adds gas-limit defaults. |
deployment/ccip/1_6_0/sequences/deploy_chain_contracts.go |
Passes gas-limit defaults to deployment. |
deployment/ccip/1_6_0/sequences/connect_chains.go |
Updates lane gas configuration. |
contracts/wrappers/gen/ccip/OffRamp.ts |
Regenerates TypeScript bindings. |
contracts/wrappers/firedrill/FiredrillOffRamp.ts |
Updates Firedrill config getter. |
contracts/wrappers/ccip/OffRamp.ts |
Adds default gas-limit constants. |
contracts/tests/gas-report/ccip/messaging/OffRamp.spec.ts |
Updates gas-report setup. |
contracts/tests/firedrill/FiredrillOffRamp.spec.ts |
Updates getter assertions. |
contracts/tests/ccip/router/Router.Setup.ts |
Updates router test setup. |
contracts/tests/ccip/receiveExecutor/ReceiveExecutor.Setup.ts |
Updates token transfer defaults. |
contracts/tests/ccip/offramp/OffRamp.spec.ts |
Updates upgrade assertions. |
contracts/tests/ccip/offramp/OffRamp.Setup.ts |
Initializes dynamic configuration. |
contracts/tests/ccip/offramp/OffRamp.execute.spec.ts |
Updates gas-limit execution tests. |
contracts/tests/ccip/offramp/OffRamp.dynamicConfig.spec.ts |
Tests dynamic gas-limit updates. |
contracts/contracts/firedrill/firedrill_offramp.tolk |
Updates Firedrill getter schema. |
contracts/contracts/ccip/offramp/types.tolk |
Defines nested dynamic configuration. |
contracts/contracts/ccip/offramp/storage.tolk |
Updates OffRamp storage layout. |
contracts/contracts/ccip/offramp/messages.tolk |
Updates dynamic-config message schema. |
contracts/contracts/ccip/offramp/events.tolk |
Updates dynamic-config event schema. |
contracts/contracts/ccip/offramp/contract.tolk |
Uses dynamic limits and migrates storage. |
Review details
Suppressed comments (1)
deployment/ccip/config/chain.go:59
- This default is below the value required by the LockRelease token pool:
LockReleaseTokenPool_OFF_RAMP_ACCOUNT_DEPLOY_VALUEiston("0.2")(contracts/contracts/ccip/pools/lock_release/types.tolk:11), anddeployOffRampAccountWithReleasesends that amount. With a 0.16 TON floor, the OffRamp accepts a transfer that cannot fund the account deployment, so the default token-transfer path can fail. Seed at least the 0.2 TON floor here.
DefaultOffRampMinTTGasLimit = "0.16"
- Files reviewed: 31/31 changed files
- Comments generated: 5
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The new storage layout is not migratable from the current 1.7.0 contract because migration only accepts and decodes 1.6.2 storage.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 26/26 changed files
- Comments generated: 2
- Review effort level: Lite
| // 5: minTTGasLimit (appended by this PR; old contracts return 5 elements) | ||
| // | ||
| // New fields are appended at the end so old contracts and old Go readers remain | ||
| // compatible — they simply read fewer stack elements. |
| struct OffRamp_StorageConfig { | ||
| staticConfig: OffRamp_StaticConfig; | ||
| dynamicConfig: Cell<OffRamp_DynamicConfig>; | ||
| } |
NONEVM-6030