Skip to content

feat: configurable gRPC client MaxDecodingMessageSize and downgrade toBlock inconsistency log - #1900

Merged
joanestebanr merged 3 commits into
developfrom
feat/grpc-client-max-decoding-size-and-toblock-log
Oct 8, 2026
Merged

joanestebanr merged 3 commits into
developfrom
feat/grpc-client-max-decoding-size-and-toblock-log

Conversation

@joanestebanr

@joanestebanr joanestebanr commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

🔄 Changes Summary

  • gRPC client: new MaxDecodingMessageSize option (bytes) in grpc.ClientConfig, applied with grpc.MaxCallRecvMsgSize. Default 16 MiB; 0 uses the gRPC default of 4 MiB. Fixes decoded message length too large: found 6984403 bytes, the limit is: 4194304 bytes when requesting aggchain proofs.
  • aggsender: the toBlock inconsistency for settled cert log is now Warn only when agglayer-derived > db-stored. When agglayer-derived < db-stored (expected when the trailing blocks of a certificate have no bridge exits) it is logged at Info. Behavior is unchanged: the derived value is always used.
  • aggoracle: removed the false Incorrect ChainID in aggOracle provided warning in createAggoracle (it compared Etherman.L1ChainID with the rollup chain ID, and fired even with the default L1ChainID = 0). docs/etherman.md now recommends not setting L1ChainID and relying on auto-discovery.

⚠️ Breaking Changes

  • 🛠️ Config: none (new optional field; default receive limit goes from 4 MiB to 16 MiB).

📋 Config Updates

  • 🧾 Diff/Config snippet: new optional MaxDecodingMessageSize (bytes, default 16777216 = 16 MiB; 0 = gRPC default of 4 MiB) in every gRPC client section:
[AggSender.AgglayerClient.GRPC]
	MaxDecodingMessageSize = 16777216  # 16MiB
[AggSender.AggkitProverClient]
	MaxDecodingMessageSize = 16777216  # 16MiB
[AggSender.ValidatorClient]
	MaxDecodingMessageSize = 16777216  # 16MiB
[AggchainProofGen.AggkitProverClient]
	MaxDecodingMessageSize = 16777216  # 16MiB
[Validator.AgglayerClient.GRPC]
	MaxDecodingMessageSize = "{{AggSender.AgglayerClient.GRPC.MaxDecodingMessageSize}}"  # inherits from AggSender

Documented in docs/common_config.md.

✅ Testing

  • 🤖 Automatic: TestNewClient_MaxDecodingMessageSize (5 MiB response rejected with the default limit, accepted when configured); NextCertificateBlockRange cases for derived lower/higher than stored.
  • 🖱️ Manual: go test ./grpc/ ./aggsender/flows/ ./aggsender/config/ ./config/

🐞 Issues

📝 Notes

  • Default is now 16 MiB (previously the gRPC 4 MiB) in grpc.DefaultConfig() and config/default.go.

🤖 Generated with Claude Code

…ock inconsistency log

- grpc.ClientConfig: new MaxDecodingMessageSize (bytes) applied via
  MaxCallRecvMsgSize; 0 keeps the gRPC default (4 MiB).
- aggsender: log "toBlock inconsistency" at warn level only when
  agglayer-derived > db-stored; otherwise log at info level, since a
  lower derived value is expected when trailing blocks have no bridge exits.

Closes #1892
Closes #1899

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T14:37:30.635822Z c85c024 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
arnaubennassar
arnaubennassar previously approved these changes Oct 8, 2026
The check compared Etherman.L1ChainID against the rollup chain ID, which
is meaningless and always warned with the default L1ChainID = 0.

Closes #1518

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@joanestebanr
joanestebanr merged commit c05c8d8 into develop Oct 8, 2026
33 checks passed
@joanestebanr
joanestebanr deleted the feat/grpc-client-max-decoding-size-and-toblock-log branch October 8, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants