Closed KaoImin closed 10 months ago
This contract only supports verify raw_transaction, but users may want to also verify the witness transaction(to ensure the witness part is valid on CKB). This contract must support merkle verify the witness_root
.
I suggest to add another input field tx_verify_type: u8
to indicates wether we want to verify a raw_transaction or a witness_transaction.
If the tx_verify_type
is 0
, the merkle root must equals raw_transaction_root
, if the tx_verify_type
is 1
the merkle root must equals to witness_transaction_root
.
This contract only supports verify raw_transaction, but users may want to also verify the witness transaction(to ensure the witness part is valid on CKB). This contract must support merkle verify the
witness_root
.I suggest to add another input field
tx_verify_type: u8
to indicates wether we want to verify a raw_transaction or a witness_transaction.If the
tx_verify_type
is0
, the merkle root must equalsraw_transaction_root
, if thetx_verify_type
is1
the merkle root must equals towitness_transaction_root
.
Sounds good.
What this PR does / why we need it?
This PR add ckb-mbt(aka merkle binary tree) proof verify precompile contract. The input struct is
Because of the transactions_root in a CKB block header is consist of two layers:
So apart from the transactions, witnesses root also needs. And it should be use ABI encode to bytes such as:
What is the impact of this PR?
No Breaking Change
PR relation:
CI Settings
### **CI Usage** **Tip**: Check the CI you want to run below, and then comment `/run-ci`. **CI Switch** - [ ] Web3 Compatible Tests - [ ] OCT 1-5 And 12-15 - [ ] OCT 6-10 - [ ] OCT 11 - [ ] OCT 16-19 - [ ] v3 Core Tests ### **CI Description** | CI Name | Description | | ----------------------------------------- | ------------------------------------------------------------------------- | | *Web3 Compatible Test* | Test the Web3 compatibility of Axon | | *v3 Core Test* | Run the compatibility tests provided by Uniswap V3 | | *OCT 1-5 \| 6-10 \| 11 \| 12-15 \| 16-19* | Run the compatibility tests provided by OpenZeppelin |