Minimal testnet for sharding
See original GitHub issueWhat is wrong?
We need the minimal P2P code to do the following.
- Maintain connections to peers, probably from a hardcoded list or at least a list of bootnodes.
- Gossip protocol to pass around new blocks/collations.
- ???
How can it be fixed
Starting point should probably be
p2p.lightchain.LightChain
p2p.peer.LESPeer
p2p.les
We’ll need to implement Command
classes for a minimal subset of commands needed to pass around blocks. Looking at the existing commands we will probably need a set of commands loosely as follows.
Status
- For initial handshake and connecting to useful peers.Announce
- For letting peers know they have a new block.GetXXX
andXXX
for things like requesting and sending blocks or headers.
Then we’ll need to implement a Protocol
class to wrap these commands, similar to LESProtocol
.
And then finally, a ShardChain
class like LightChain
which uses the protocol to join the network, find suitable peers, learn the appropraite chain of blocks that it should sync with and then request the blocks and headers and do whatever is needed with them.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:17 (9 by maintainers)
Top Results From Across the Web
Ontology Sharding TestNet Released - Medium
The Ontology Sharding TestNet includes three shards, which can achieve cross-chain interaction. We can see from the table above that the ...
Read more >Shardeum Blockchain Testnet is Live! Here's How to Claim ...
Sharding breaks the job of validating and confirming a ton of commercial transactions into small and manageable bits, or shards. This helps the ......
Read more >Ethereum Sharding: An Introduction to Blockchain Sharding
Blockchain sharding is the process of a blockchain being sharded, or split, where each shard stores and processes a portion of the blockchain's...
Read more >Prysm Sharding Plan - HackMD
The basic idea of sharding in eth2 has to do with broadcasting a shard block over its appropriate shard subnet in p2p, then...
Read more >Provisioning Sharding for Smart Contracts: A Design for Zilliqa
In a non-sharded architecture, each (full) node in the blockchain network processes and validates every transaction. Typical examples of non- ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I suggested
p2p.Server
because I envisioned it’d be the main service, responsible for orchestrating all others. It’d accept incoming peer connections but also run theDiscoveryProtocol
, tellPeerPool
to connect to more nodes when necessary, and pass that pool to other services likeLightChain
or the newChainSyncer
I think it might make more sense to have a new service (
p2p.Server
, maybe?) that creates and runs aPeerPool
, then callsawait asyncio.start_server()
to get new incoming connections and pass them on to thePeerPool
after the auth and base-protocol handshakes are complete