Skip to content

implement inclusion proof verif#63

Merged
KyrylR merged 2 commits intoBlockstreamResearch:mainfrom
topologoanatom:tx-incl-verif
Jan 29, 2026
Merged

implement inclusion proof verif#63
KyrylR merged 2 commits intoBlockstreamResearch:mainfrom
topologoanatom:tx-incl-verif

Conversation

@topologoanatom
Copy link
Collaborator

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.

@KyrylR
Copy link
Collaborator

KyrylR commented Jan 23, 2026

Public functions should go first, then private

@topologoanatom topologoanatom force-pushed the tx-incl-verif branch 2 times, most recently from 6149071 to 22d42ff Compare January 23, 2026 13:34
Some((tx_index, build_merkle_branch(tx_index, block)))
}

/// Verifies proof of tx inclusion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Give more context to the doc, where it is used, which environment is needed, what are expectations, link to the Liquid's whitepaper, etc.

Comment on lines +99 to +101
/// Taken from rust-elements
/// <https://github.com/ElementsProject/rust-elements/blob/master/src/internal_macros.rs>
macro_rules! hex_deserialize(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it make sense to file an issue, so they expose this method?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Collaborator

@KyrylR KyrylR Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then, how the end user would use the merkle_branch function?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From where would he get a block (what is the deserialization flow?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator

@KyrylR KyrylR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK d811af9

@KyrylR KyrylR merged commit aaaf2fb into BlockstreamResearch:main Jan 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transaction inclusion into Liquid block verification

2 participants