Skip to content

docs(deploy): gas-free chain checks and their results - #54

Merged
pegahcarter merged 4 commits into
mainfrom
docs/chain-checks
Oct 8, 2026
Merged

pegahcarter merged 4 commits into
mainfrom
docs/chain-checks

Conversation

@pegahcarter

Copy link
Copy Markdown
Contributor

Runs every pre-mainnet chain check that needs no gas (eth_call, provider and node source, local measurement) and records them so a new chain or provider can repeat them.

  • contracts/evm/deploy/CHECKS.md: each check with its command and pass rule, each provider's ids and endpoint addresses per chain, results as of 2026-10-07, and what the checks cannot cover. deploy/README.md §2 points to it.
  • docs/todo.md §1–§2 record the findings.
  • Tron's CREATE2 prefix is settled as 0x41 from java-tron's source; comments in AddressDerive, DivergentAccounts, CloneDerivation.t.sol, and provider-research updated.
  • Blake2b256: a test that another precompile at 0x09 (Tron's BatchValidateSign, 32 bytes) fails closed, and the comment says so. Comments only in src/; sizes unchanged.
  • CLAUDE.md: which deploy files apply when adding a chain vs a provider.

Found and filed, not fixed here: #50 (LayerZero empty options revert on every endpoint), #51 (LayerZero cannot reach zkSync), #52 (default gas below a bootstrap's cost), #53 (no Wormhole quoter router on the configured chains).

755 tests pass; forge lint clean on both profiles.

…ults

CHECKS.md lists each check, how to run it, and each provider's endpoint
addresses; README §2 points to it, and todo §1-§2 records what it found
(#50-#53).
Tron's 0x09 is BatchValidateSign, which returns 32 bytes.
Copilot AI balanced review requested due to automatic review settings October 7, 2026 08:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

Changes are documentation, NatSpec comments, and one additive test with no production bytecode change, and all cross-references, numbers, and the new test's logic were verified consistent.

Review effort: Balanced
Findings: None

What changed in this PR

This PR records the results of the pre-mainnet chain checks that require no gas (eth_call/eth_getCode/provider source reads and local Forge gas measurements) so that onboarding a new chain or provider can repeat them. It introduces a new contracts/evm/deploy/CHECKS.md as the single source for each check (command + pass rule), per-provider endpoint addresses, and the measured results as of 2026-10-07, then rewires the surrounding docs and code comments to point at it. The research resolves two previously-open uncertainties in NatSpec (Tron's CREATE2 0x41 prefix from java-tron, and the BLAKE2F-at-0x09 behavior on zkSync/Tron) and files four non-blocking issues (#50–#53) rather than fixing them here.

Changes:

  • Adds deploy/CHECKS.md and repoints deploy/README.md §2, docs/todo.md §1–§2, and docs/provider-research.md to it.
  • Settles Tron 0x41 and BLAKE2F comments in AddressDerive, DivergentAccounts, Blake2b256, and CloneDerivation.t.sol; adds a test that a foreign 32-byte return at 0x09 fails closed.
  • Adds a "Adding a chain or a provider" section to CLAUDE.md.
File Description
contracts/​evm/​deploy/​CHECKS.md New file: all gas-free checks, provider ids/endpoint addresses, and 2026-10-07 results.
contracts/​evm/​deploy/​README.md §2 now defers to CHECKS.md instead of inlining the check list.
docs/​todo.md §1–§2 rewritten to summarize findings and reference CHECKS.md and issues #50–#53.
docs/​provider-research.md Notes java-tron source settles the Tron formula; bytecode hash still needs a deployment.
contracts/​evm/​src/​derivation/​AddressDerive.sol Comment: 0x41 origin explained via WalletUtil.generateContractAddress2.
contracts/​evm/​src/​derivation/​Blake2b256.sol Comment: enumerates the three non-EIP-152 0x09 outcomes the size check guards against.
contracts/​evm/​src/​messaging/​transceiver/​DivergentAccounts.sol Comment: Tron formula settled; only TRON-solc bytecode hash unverified.
contracts/​evm/​test/​CommitmentScheme.t.sol New test that a 32-byte return at 0x09 reverts PrecompileFailed.
contracts/​evm/​test/​CloneDerivation.t.sol Comment: formulas checked vs Era/java-tron; artifact hashes still need deployment.
CLAUDE.md New section on which deploy files apply when adding a chain vs a provider.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@pegahcarter
pegahcarter merged commit b552ad3 into main Oct 8, 2026
2 checks passed
@pegahcarter
pegahcarter deleted the docs/chain-checks branch October 13, 2026 18:11
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.

2 participants