Repository navigation
Conversation
…tocol The integration tests deployed `taikoxyz/taiko-mono@main`'s contracts from a second checkout rather than the contracts in the pull request, so a change to the protocol could never be validated against the client in the same PR: the job tested different contracts on every re-run, and a protocol change that breaks the client only surfaced after it had merged. The taiko-client-rs workflow already deploys the PR's own `packages/protocol` for exactly this reason; do the same here, and trigger both workflows on the contracts and deploy script the tests actually run through `DeployProtocolOnL1`. Cover both ends of the `basefeeSharingPctg` range while we are here. The inbox accepts 0 to 100 inclusive, and taiko-geth splits a transaction's basefee as `gasUsed * baseFee * pctg / 100` to the coinbase with the remainder to the treasury, so 0 pays the coinbase nothing and 100 pays the treasury nothing. The client only ever plumbs the byte -- it does no arithmetic with it -- so the encoder is where the range is pinned: `EncodeShastaExtraData` had no test at all and now round-trips every boundary value through the decoder both clients rely on, asserts the percentage and proposal ID never read each other's bytes, and pins the three proposal IDs the encoder refuses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhqmeYDadT95CmcUhWzc2B
🐋 DeepSeek Code Review🔴 Critical IssuesNone. 🟡 Warnings
🔵 Suggestions
🟢 What Looks Good
Automatically triggered on PR update • model: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted filessee 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Stacked on #22127 — review that one first; this PR's diff is the three files below.
The bug
taiko-client--test.ymlran its integration tests against contracts from a second checkout pinned tomain, not the contracts in the pull request:Two consequences. A protocol change could never be validated against the client in the same PR — it only surfaced after merging, in some unrelated PR's CI. And because
mainmoves, the job tested different contracts on every re-run, so a green result did not mean the same thing twice.taiko-client-rs--test.ymlalready deploys the PR's ownpackages/protocol, with a comment giving exactly this reasoning. This brings the Go workflow in line.What changed
taiko-client--test.yml— drop themain-pinned checkout andPROTOCOL_FORK_DIR; pointPROTOCOL_DIRat${{ github.workspace }}/packages/protocol, which the job already has checked out.packages/protocol/contracts/**andpackages/protocol/script/layer1/core/**. These are what the tests deploy throughDeployProtocolOnL1, so a change to them can break the client without touching a single client file. Without this the fix above would still never fire on a protocol-only change.bindings/encoding/input_test.go(new) — boundary coverage forbasefeeSharingPctg.basefeeSharingPctg at 0 and 100
The inbox accepts
0 <= basefeeSharingPctg <= 100(LibInboxSetup.validateConfig), and taiko-geth splits each transaction's basefee asgasUsed * baseFee * pctg / 100to the coinbase with the remainder to the treasury. So 0 pays the coinbase nothing and 100 pays the treasury nothing — both ends are reachable configurations, not edge cases.The client itself is already indifferent: it only plumbs the byte into
extraDataand never does arithmetic with it. The exposure was entirely in tests that assumed a split.EncodeShastaExtraDatahad no test at all, so this adds three:{0, 1, 25, 75, 99, 100}round-trips throughcore.DecodeShastaBasefeeSharingPctg;uint48proposal ID;The two treasury integration tests were made percentage-aware in #22127, which also moves
DevnetInboxto 100. Combined with the workflow fix here, this PR is the first run where the integration suite actually deploys and exercisesbasefeeSharingPctg: 100end to end — on the base branch alone those tests still ran againstmain's contracts at 75.Testing
go test ./bindings/encoding/andgo vet ./bindings/encoding/ ./driver/chain_syncer/event/pass locally; both workflow files parse as YAML. The integration lanes on this PR are the real check for the workflow change — they should now deploy this branch's contracts rather thanmain's.🤖 Generated with Claude Code
https://claude.ai/code/session_01UhqmeYDadT95CmcUhWzc2B
Generated by Claude Code