This repository has been archived by the owner on Oct 4, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
Parallel Block Downloads
Edward Ruchevits edited this page Sep 30, 2015
·
3 revisions
New network protocol & strategy.
- Achieve parallel downloads of chain
- Introduce framework that can form basis of Swarm
- Minimise unnecessary block transfers
- Two peers connect & say Hello. Hello includes the TD & hash of their best block.
- The client with the worst TD asks peer for full chain of just block hashes.
- Chain of hashes is stored in space shared by all peer connections, and used as a "work pool".
- While there are hashes in the chain of hashes that we don't have in our chain:
- Ask for N blocks from our peer using the hashes. Mark them as on their way so we don't get them from another peer.
Network protocol: 33
Additional parameters to Hello:
-
TD
: Total Difficulty of the best chain. Integer. -
BestHash
: The hash of the best (i.e. highest TD) known block. -
GenesisHash
: The hash of the Genesis block.
Additional Message types:
-
0x17
:GetBlockHashes
[hash
:B_32
,maxBlocks
:P
]: Requests aBlockHashes
message of at mostmaxBlocks
entries, of block hashes from the blockchain, starting at the parent of blockhash
. Does not require the peer to givemaxBlocks
hashes - they could give somewhat fewer. -
0x18
:BlockHashes
[hash_0
:B_32
,hash_1
:B_32
, .... ]: Gives a series of hashes of blocks (each the child of the next). This implies that the blocks are ordered from youngest to oldest. -
0x19
:GetBlocks
[hash_0
:B_32
,hash_1
:B_32
, .... ]: Requests aBlocks
message detailing a number of blocks to be sent, each referred to by a hash. Note: Don't expect that the peer necessarily give you all these blocks in a single message - you might have to re-request them.
Remove Message types:
GetChain
NotInChain
- Ðapp Developer Resources
- JavaScript API
- JSON RPC API
- Solidity
- Solidity Features
- Useful Ðapp Patterns
- Standardized Contract APIs
- Ðapp using Meteor
- Ethereum development tutorial
- Mix Tutorial
- Mix Features
- Serpent
- LLL
- Mutan
- Morden Testnet
- Chain Spec Format
- Inter-exchange Client Address Protocol
- URL Hint Protocol
- NatSpec Determination
- Network Status
- Raspberry Pi
- Exchange Integration
- Mining
- Licensing
- Consortium Chain Development
- RLP Encoding
- RLPx Node Discovery Protocol
- ÐΞVp2p Wire Protocol
- ÐΞVp2p Whitepaper (WiP)
- Web3 Secret Storage
- Patricia Tree
- Wire protocol
- Light client protocol
- Subtleties
- Solidity, Docs & ABI
- NatSpec Format
- Contract ABI
- Bad Block Reporting
- Bad Chain Canary
- Extra Data
- Brain Wallet