-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Validating Bitcoin transaction proof (#537)
Refs: keep-network/optimistic-minting#6 This PR adds functionalities for validating transaction inclusion in the Bitcoin blockchain: - the data for the proof is taken from the electrum client - the Merkle tree is validated. This ensures the transaction was included in the first block - the chain of block headers are validated. This ensures the block in which the transaction entered the blockchain has confirmations. Testnet transaction are treated specially: when the passed previous/current difficulties are both set to `1`, we skip difficulty checks. This is due to difficulty in Testnet frequently dropping to `1`. One thing that can be problematic is using `LightRelay` as the source of current/previous difficulties. It takes some time before `LightRelay` is updated after a new Bitcoin epoch begins. Therefore the current/previous difficulties in `LightRelay` sometimes lag the real ones.
- Loading branch information
Showing
6 changed files
with
1,153 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.