implement inclusion proof verif#63
Conversation
|
Public functions should go first, then private |
6149071 to
22d42ff
Compare
22d42ff to
8b54add
Compare
| Some((tx_index, build_merkle_branch(tx_index, block))) | ||
| } | ||
|
|
||
| /// Verifies proof of tx inclusion |
There was a problem hiding this comment.
Give more context to the doc, where it is used, which environment is needed, what are expectations, link to the Liquid's whitepaper, etc.
| /// Taken from rust-elements | ||
| /// <https://github.com/ElementsProject/rust-elements/blob/master/src/internal_macros.rs> | ||
| macro_rules! hex_deserialize( |
There was a problem hiding this comment.
Does it make sense to file an issue, so they expose this method?
There was a problem hiding this comment.
I'm not sure that makes sense, since it is only used for tests and would not fit the original intent (all macros in that file are private).
There was a problem hiding this comment.
Then, how the end user would use the merkle_branch function?
There was a problem hiding this comment.
From where would he get a block (what is the deserialization flow?)
There was a problem hiding this comment.
From where would he get a block (what is the deserialization flow?)
There is an elements::encode::deserialize function, which is already used by the macro itself. The macro does not fit any use case other than deserializing hard-coded hex values.
Fixes #55.
Description
Implements transaction inclusion into a Liquid block. Verification of whether the block was signed is omitted, as it is too complicated to implement within the infrastructure provided by
rust-elements.