ChainSafe / chainbridge-celo

GNU Lesser General Public License v3.0
3 stars 2 forks source link

Add rlpHeader param to SignatureVerification structure #118

Closed P1sar closed 3 years ago

P1sar commented 3 years ago

According to newer investigation on Celo and our sides, was defined that to make Proof valid we should somehow prove that TxRootHash belongs to BlockHash that was signed by provided Aggregated Public Key of block validators ( here and next APK). To prove this wee need to add additional param

Implementation details

Add rlpHeader - rlp encoded of concatenated block header data. This RLP encoding usually used to calculate BlockHash. SO basically you need to make rlp.Encode over header struct. (https://github.com/celo-org/celo-blockchain/blob/master/core/types/block.go#L70)

Testing details

the tests is passing

Acceptance Criteria

the tests is passing SignatureVerification contains RLPHeader

waymobetta commented 3 years ago

@P1sar

Add rlpHeader - rlp encoded of concatenated block header data.

As this relates to SignatureVerification, is this RLP encoding of just IstanbulExtra data or all header data?

^ It looks like the IstanbulExtra data is already being RLP encoded to bytes in some of the tests so this must be all header data.

P1sar commented 3 years ago

check the link in issue it basically contains all code you need to write. Header means all header.