Module: Bitcoin::Message
- Defined in:
- lib/bitcoin/message.rb,
lib/bitcoin/message/tx.rb,
lib/bitcoin/message/inv.rb,
lib/bitcoin/message/addr.rb,
lib/bitcoin/message/base.rb,
lib/bitcoin/message/ping.rb,
lib/bitcoin/message/pong.rb,
lib/bitcoin/message/block.rb,
lib/bitcoin/message/error.rb,
lib/bitcoin/message/reject.rb,
lib/bitcoin/message/addr_v2.rb,
lib/bitcoin/message/cfilter.rb,
lib/bitcoin/message/headers.rb,
lib/bitcoin/message/ver_ack.rb,
lib/bitcoin/message/version.rb,
lib/bitcoin/message/get_addr.rb,
lib/bitcoin/message/get_data.rb,
lib/bitcoin/message/mem_pool.rb,
lib/bitcoin/message/block_txn.rb,
lib/bitcoin/message/cf_parser.rb,
lib/bitcoin/message/cfcheckpt.rb,
lib/bitcoin/message/cfheaders.rb,
lib/bitcoin/message/inventory.rb,
lib/bitcoin/message/not_found.rb,
lib/bitcoin/message/fee_filter.rb,
lib/bitcoin/message/filter_add.rb,
lib/bitcoin/message/get_blocks.rb,
lib/bitcoin/message/send_cmpct.rb,
lib/bitcoin/message/cmpct_block.rb,
lib/bitcoin/message/filter_load.rb,
lib/bitcoin/message/get_headers.rb,
lib/bitcoin/message/filter_clear.rb,
lib/bitcoin/message/get_cfilters.rb,
lib/bitcoin/message/merkle_block.rb,
lib/bitcoin/message/network_addr.rb,
lib/bitcoin/message/prefilled_tx.rb,
lib/bitcoin/message/send_addr_v2.rb,
lib/bitcoin/message/send_headers.rb,
lib/bitcoin/message/get_block_txn.rb,
lib/bitcoin/message/get_cfcheckpt.rb,
lib/bitcoin/message/get_cfheaders.rb,
lib/bitcoin/message/headers_parser.rb,
lib/bitcoin/message/block_transactions.rb,
lib/bitcoin/message/inventories_parser.rb,
lib/bitcoin/message/header_and_short_ids.rb,
lib/bitcoin/message/block_transaction_request.rb
Defined Under Namespace
Modules: CFParser, HeadersParser, InventoriesParser Classes: Addr, AddrV2, Base, Block, BlockTransactionRequest, BlockTransactions, BlockTxn, CFCheckpt, CFHeaders, CFilter, CmpctBlock, Error, FeeFilter, FilterAdd, FilterClear, FilterLoad, GetAddr, GetBlockTxn, GetBlocks, GetCFCheckpt, GetCFHeaders, GetCFilters, GetData, GetHeaders, HeaderAndShortIDs, Headers, Inv, Inventory, MemPool, MerkleBlock, NetworkAddr, NotFound, Ping, Pong, PrefilledTx, Reject, SendAddrV2, SendCmpct, SendHeaders, Tx, VerAck, Version
Constant Summary collapse
- USER_AGENT =
"/bitcoinrb:#{Bitcoin::VERSION}/"
- SERVICE_FLAGS =
{ none: 0, network: 1 << 0, # the node is capable of serving the block chain. It is currently set by all Bitcoin Core node, and is unset by SPV clients or other peers that just want network services but don't provide them. # getutxo: 1 << 1, # BIP-64. not implemented in Bitcoin Core. bloom: 1 << 2, # the node is capable and willing to handle bloom-filtered connections. Bitcoin Core node used to support this by default, without advertising this bit, but no longer do as of protocol version 70011 (= NO_BLOOM_VERSION) witness: 1 << 3, # the node can be asked for blocks and transactions including witness data. # xthin: 1 << 4 # support Xtreme Thinblocks. not implemented in Bitcoin Core }
- DEFAULT_SERVICE_FLAGS =
DEFAULT_SERVICE_FLAGS = SERVICE_FLAGS | SERVICE_FLAGS | SERVICE_FLAGS
SERVICE_FLAGS[:none] | SERVICE_FLAGS[:witness]
- DEFAULT_STOP_HASH =
"00"*32
- VERSION =
the protocol version.
{ headers: 31800, pong: 60001, bloom: 70011, send_headers: 70012, fee_filter: 70013, compact: 70014, compact_witness: 70015 }
- NETWORK_ID =
{ipv4: 0x01, ipv6: 0x02, tor_v2: 0x03, tor_v3: 0x04, i2p: 0x05, cjdns: 0x06}
- INTERNAL_IN_IPV6_PREFIX =
"fd6b:88c0:8724"
Class Method Summary collapse
-
.decode(command, payload = nil) ⇒ Bitcoin::Message::
Decode P2P message.
Class Method Details
.decode(command, payload = nil) ⇒ Bitcoin::Message::
Decode P2P message.