Polkadot BTC-Relay Spec
v1.2
Introduction
BTC-Relay at a Glance
BTC-Relay Architecture
Bitcoin Data Model
Accepted Bitcoin Transaction Format
Specification
Data Model
Functions: Storage and Verification
Functions: Utils
Functions: Parser
Events
Error Codes
Security and Performance
Security Analysis
Performance and Costs
All the rest
License
Interlay
Polkadot BTC-Relay Spec
»
Welcome to the Polkadot BTC-Relay documentation!
View page source
Welcome to the Polkadot BTC-Relay documentation!
ΒΆ
Introduction
BTC-Relay at a Glance
Overview
How to Use this Document
BTC-Relay Architecture
Actors
Components
Bitcoin Data Model
Block Headers
Transactions
Inputs
Outputs
Accepted Bitcoin Transaction Format
P2PKH / P2WPKH
OP_RETURN
Specification
Data Model
Types
Constants
Structs
Data Structures
Functions: Storage and Verification
initialize
storeBlockHeader
checkAndDoReorg
verifyBlockHeader
verifyTransactionInclusion
validateTransaction
flagBlockError
clearBlockError
Functions: Utils
sha256d
concatSha256d
nBitsToTarget
checkCorrectTarget
computeNewTarget
computeMerkle
calculateDifficulty
getForkIdByBlockHash
incrementChainCounter
Functions: Parser
Block Header
Transactions
Events
Initialized
StoreMainChainHeader
StoreForkHeader
ChainReorg
VerifyTransaction
ValidateTransaction
Error Codes
Security and Performance
Security Analysis
Security Parameter
k
Liveness Failures
Safety Failures
Hard and Soft forks
Performance and Costs
Estimation of Storage Costs
BTC-Relay Optimizations
All the rest
License
Interlay