-
Notifications
You must be signed in to change notification settings - Fork 120
Nimbus Roadmap
This document attempts to specify a list of high-level components of the Nimbus project that can be developed and tested in isolation. It tries to identify the dependencies between the development tasks, so the implementation efforts can be scheduled in parallel where appropriate. Please keep in mind that the list is not exhaustive and further planning is necessary before all tasks are specified in the same level of detail.
Remaining tasks:
- GPU Mining
- Mining with Stratum server support
The AES library should support both AES256 in CTR mode (as per the RLPx spec) and GCM mode (used in Whisper v6)
Library used: NimCrypto
Required for the encyprted handshake. Based on libsecp256k1.
Reference implementation:
Depends on:
Both cpp-ethereum and Parity also use Scrypt in their local keystore code. It doesn't seem mandatory for the implementation.
Bloom filters are used for efficient monitoring of the transaction logs/events, stored in the receipt trie of the blockchain, for topic selection in Whisper and some other places.
Reference implementation:
Existing Nim library:
The key file stores the keys associated with one or more accounts in password-protected encrypted form.
Reference implementation:
Implementation:
Sub-tasks:
- Safe storage (PBKDF2)
- Safe storage (SCRYPT)
- Key generation (PBKDF2)
- Key generation (SCRYPT)
- Password recovery (is it possible at all?)
- Use native APIs on mobile platforms
Depends on:
Development already started. This will be an ongoing effort and the list of supported calls should increase as other parts of the system are developed.
Reference information:
Optional components: [ ] WS-RCP Server [ ] IPC Server [ ] Password protection
Sub-tasks:
- CI tests for Genesis
- CI tests for VM JSON tests
- CI tests for storage backends
- CI tests for stack functionality
- CI tests for code stream
- CI tests for VM memory
- CI tests for VM opcodes
- CI tests for GeneralStateTests JSON tests
- CI tests for other libraries
- Validate that the entire history of Ethereum can be executed by Nimbus
- Check that we fit in a certain memory/compute budget?
This uses a modified and stripped down version of Kademlia. Kademlia us also used in Swarm for resource discovery and some of the logic for maintaining peer connection tables can be shared between the two implementations.
In the sharded blockchan, each shard is represented by a separate P2P network. This is implemented by running the same node discovery protocol, but with a different peer connection port:
In the future, Ethereum may support alternative transport protocols (such as lib2p2). To enable this, there is new version 5 of the node discovery protocol in development, which allow the nodes to advertise alternative connection methods (ENR):
Version 5 of the protocol also allows the discovery of nodes with certain capabilities:
-
https://github.com/fjl/p2p-drafts/blob/master/discv5-topics.md
-
https://github.com/ethereum/go-ethereum/tree/master/p2p/discv5
-
https://github.com/fjl/EIPs/blob/f80eb12f22f178c81dc2a6de4be0c73cd302b73b/EIPS/eip-778.md
Sub-tasks:
The standard Ethereum protocols use TCP to communicate between peers. Hosts with private IP addresses must set up port redirection on their routers. UPnP can be used to automate this.
Related tasks:
[X] Implement the nat
options of the other Ethereum clients.
The user can choose from any
, none
, upnp
, extip
(Geth aslo has pmp
)
https://github.com/ethereum/devp2p/blob/master/rlpx.md#encrypted-handshake
Sub-tasks:
- Authenticate previously known nodes with an old session key
- Authenticate newly discovered nodes
- Support RLPx sub-protocol negotiation in the authentication message (capabilities)
- Derive shared secrets from handshake
Depends on:
The Ethereum wire protocols are transport-agnostic. Our framework should allow running them over the TCP connections established after node discovery or through connections established with libp2p or uTP in the future. It should also be possible to define unit tests involving multiple agents simulated within a single process (bypassing the network stack).
Issues:
None of the protocols currently supports using NAT traversal for directly establishing P2P connections. This may be important for supporting Video and Audio calls in Status. We can solve this by establishing such connections in an out-of-band protocol (e.g. by linking WebRTC or something similar) or by contributing EIPs for the existing protocols.
Sub-tasks:
-
SubProtocol registry
-
Active protocol map (shared objects)
-
Message dispatcher
-
Subprotocol definition DSL
-
Protocol negotiation
-
Per-subprotocol send queue
-
Chunking
-
Peer reputation tracking (with persistence)
-
Flow control (optional)
-
Pre-sending PoW priority increase
Replaces the old hexary trie in the new blockchain shards.
Sub-tasks:
- Add support for partial tries
- Support for obtaining and verifying Merkle proofs
Reference implementations:
- https://github.com/ethereum/research/blob/master/trie_research/new_bintrie.py
- https://github.com/ethereum/py-trie/blob/master/trie/binary.py
There should be sufficient parametrization to allow:
-
The Chain is instantiated with a Trie type (either Binary or Hexary)
-
Per-account database key handling (single layer trie)
-
Different header structure (in the Sharded chains, header creation is also tracked in the VMC)
-
Different transaction fields
-
Different VM behavior (i.e. CALL opcode, the other new opcodes)
-
per-transaction witness (account access lists): https://github.com/ethereum/sharding/blob/develop/docs/doc.md#access-list https://github.com/ethereum/py-evm/issues/195
The new shard chain uses a new account creation method:
- https://github.com/ethereum/py-evm/issues/203
- https://ethresear.ch/t/tradeoffs-in-account-abstraction-proposals/263
- https://github.com/ethereum/EIPs/blob/bd136e662fca4154787b44cded8d2a29b993be66/EIPS/abstraction.md
... which requires 3 new opcodes to be added:
- SIGHASH
- PAYGAS
- CREATE2
Current outstanding tasks:
- Stateless and stateful execution with roll-back
- Maintenance of a receipt trie
- Block validation
- Precompiled contracts
- Transaction pool
Depends on:
Extra tasks:
- VM execution tracing/stepping
Fast sync uses the standard Ethereum sub-protocol.
Parity's warp sync is based on a custom server and protocol developed by the Parity team.
The sharding client features an even faster stateless sync protocol that aims to obtain only the latest block headers and to perform a randomized verification that the blockchain data is available upon request:
Depends on:
- RLPx Sub-protocols
- Functional blockchain storage
- The stateless sync depends on LES and the Binary Trie
Related tasks: [ ] Blockchain init from a genesis config for private networks
Make it easier to interact with known contracts such as Casper, the Sharding VMC, etc. Each such contract has a well-known address and a particular API that can be expressed in standard Nim.
Libraries such as web3.js and web.py offer similar functionality.
Sub-tasks:
- Nim-types-to-ABI-types translation and contract FFI DSL.
- Transaction creation logic
- Event monitoring logic
- Provide high-level information about the contract for the UI layer (NatSpec, etc)
Depends on:
The light client operates without storing the full chain locally. Most operations depends on Asynchronous APIs that will downloads parts of the chain on-demand. Light clients can also execute DApps by monitoring the new blocks for events of interest.
- https://github.com/ethereum/wiki/wiki/Light-client-protocol
- https://github.com/paritytech/parity/wiki/Light-Client
Sub-tasks:
- Events monitoring
- State-fetching APIs
- Flow control
- Fetch queue
Depends on:
- Partial tries
- Bloom filters
- RLPx Sub-protocols
- DApp framework
- https://ethresear.ch/t/the-stateless-client-concept/172
- https://github.com/ethereum/sharding/blob/develop/docs/doc.md#stateless-clients
Sub-tasks:
- Transaction state witness extraction
- Stateless sync
- State objects and "pure" VM execution
- Track updates to all keys in the witness in an in-memory store.
Depends on:
Sub-tasks:
- Resolve names by recursive ENS contract application
Depends on:
- Functional Blockchain repica / VM
- Known contract abstraction
While Swarm seems a better fit for Status's needs, we may also implement the Whisper protocol, which is currently at version 6:
Overview information (previous versions):
Sub-tasks:
- Envelope encryption
- Mail Server
- Filter table
- Onion routing (Darkness)
Depends on:
Sub-tasks:
- Provide options for launching the various daemons and modes of Nimbus
- Define a common scheme for specifying parameters (as command-line switches, as env vars, in configuration files, etc)
- Provide abstractions over local file system usage (e.g. XDG, AppData, Android and iOS specific APIs)
- Provide compile-time defines for turning off features of Nimbus (i.e. allow the lite clients to omit most of the code)
- Blockchain export/inspection APIs and CLIs
- Test example applications using Nimbus as a library
- Define various UIs for Nimbus (Web UI, GUI, etc)
- Android build / CI test suite
- iOS build / CI test suite