[P3] Bridge: align ETH README/docs messageHash with BridgeContract.sol (#1285)#1294
Open
bonujel wants to merge 2 commits into
Open
[P3] Bridge: align ETH README/docs messageHash with BridgeContract.sol (#1285)#1294bonujel wants to merge 2 commits into
bonujel wants to merge 2 commits into
Conversation
…onka-ai#1285) Beyond the README quickfix, the other two bridge docs carried the same messageHash inconsistency plus stale BLS point sizes. Align them with the contract source: - messageHash now includes address(this) and the full field order for both withdraw and mint (matches BridgeContract.sol). - BLS sizes corrected to the EIP-2537 precompile encoding: G1 signature 128 bytes, G2 group key 256 bytes (uncompressed), replacing the old 48/96-byte compressed figures. - Fixed the trailing-comma typo in the mint encoding example. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Author
|
Hi @tcharchian , I've opened this PR for #1285 (docs alignment). Whenever you have a moment, I'd really appreciate it if you could take a look. Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #1285. The Ethereum bridge docs documented the mint/withdraw signed payload without the
address(this)(bridge contract address) field, while the contract source includes it. The chain-side signer already matches the contract, so this is not a production-safety issue — but third-party auditors/integrators following the docs would build an invalidmessageHashand hit signature-verification failures.This brings the docs back in line with
BridgeContract.sol.gl/eth-readme-quickfix, commit7180faa8): addsaddress(this)to the mint and withdrawmessageHashinproposals/ethereum-bridge-contact/README.md.SETUP.mdandethereum-bridge-contract.mdmessageHashnow includeaddress(this)and the full field order for withdraw and mint.Docs-only; no code paths touched.
Field order (now matches
BridgeContract.sol)epochId, GONKA_CHAIN_ID, requestId, ETHEREUM_CHAIN_ID, WITHDRAW_OPERATION, recipient, address(this), tokenContract, amountepochId, GONKA_CHAIN_ID, requestId, ETHEREUM_CHAIN_ID, MINT_OPERATION, recipient, address(this), amountTest plan
messageHashfield order againstBridgeContract.sol(keccak256(abi.encodePacked(...)), lines 352/416)signature.length == 128,groupPublicKey.length == 256)