Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify tx inclusion proofs #18

Open
keppel opened this issue Jul 19, 2018 · 1 comment
Open

Verify tx inclusion proofs #18

keppel opened this issue Jul 19, 2018 · 1 comment

Comments

@keppel
Copy link
Collaborator

keppel commented Jul 19, 2018

Tendermint RPC has a /tx?hash=_&prove=_ endpoint which returns a proof that the transaction with the given hash made it into a block.

It would be nice if the LightNode class had a method to retrieve and verify these proofs.

Perhaps something like:

let tendermint = require('tendermint')
let lightClient = tendermint(nodeAddress, initialClientState)

let txIncluded = await lightClient.verifyTxInclusion(txHash) // `true` or `false`
@mappum
Copy link
Owner

mappum commented Jul 27, 2018

Good idea, I think this concept makes sense. Is the use case for clients broadcasting transactions and checking to ensure it was included in a block?

Probably makes sense to include the relevant information about the transaction (height, result, etc.) since we're fetching it anyway.

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

No branches or pull requests

2 participants