nimbus-eth1
nimbus-eth1 copied to clipboard
Current TODO items for 1.0
Nimbus 1.0 TODO
Summary
Meta-issue of the currently known work remaining to reach 1.0.
Chain, State & VM
- [ ] Missing functionality:
- [x] Fetch block bodys (See #126)
- [ ] Fetch proofs
- [ ] Fetch settings
- [x] Gas costs intricacies and estimation
- [x] Fork differences in VM & edge cases (particularly with
Call
&Create
) (See #121 and #123) - [x] Missing
transaction pending
pool - [x] Transaction logging and retrieval
- [x] Mining
- [ ] Filtering functionality for working with RPC filters
- [x] Journal DB integration in chain (handled in
Call
/Create
, needs to be integrated for other VM components)
Networking, P2P & LES
- [ ] Low number of blocks parsed before failure (block number
49,439
) - [ ] RPC internal integration where appropriate & comprehensive test suite
- [ ] Small additions to sync and LES
- [ ] IP 6 support
Misc
- [x] Whisper
- [x] EVMC support (See #114)
- [ ] Truffle support (See #103)
- [ ] Sharable debugging and testing environment (See #172)
- [x] Block validation tool (See #171)
- [ ] Fuzzy testing & Sanitisation (See #164)
Missing Important Functionality
- [x] DB_Chain:
- [x] Stub:
getBlockBody
- [x] Stub:
getBlockTransactionHashes
- [x] Stub:
- [x] Chain:
- [x]
processTransaction
must run VM
- [x]
- [x] VM_State_Transitions:
- [x] Stub:
executeTransaction
- [x] Stub:
addTransaction
- [x] Stub:
- [x] Header:
- [x]
generateHeaderFromParentHeader
difficulty calculation & data
- [x]
- [ ] P2P:
- [ ] Stub:
handleLostPeer
- [x] Stub: Handshake response (mock peers)
- [ ] Stub:
- [ ] LES
- [ ] Announce must handle a new block
- [x] Eth_Common
- [x] Many stubbed procedures
TODO by unit
Client interface
nimbus.nim
- [ ] Networking: IP6, multiple bind addresses
- [ ] TODO mentions "No database support"? What about rocksdb? Or is this referencing journalling?
- [ ] Use CLI/RPC when ready
sqlite_backend.nim
- [ ] Implement schema versioning
Chain & State
db_chain.nim
- [x] Journal DB integration
- [x] Stub:
getBlockBody
(reads block body from hash) - [x] Stub:
getBlockTransactionHashes
(iterates over transaction hashes for specified block) - [x]
setAsCanonicalChainHead
doesn't re-add transaction to internal pending pool if local sender
state_db.nim
- [x] ~
newAccountStateDB
ignores the read only flag.~ -- Implemented via ReadOnlyStateDB. - [x] ~AccountStateDB.rootHash= No way to set roothash~ -- Implemented.
genesis.nim
- [x] Support genesis blocks for KovanNet and MordenNet. CustomNet?
chain.nim
- [x] ~
processTransaction
needs to run the VM for a contract call, perhaps needs refactoring to use computation~ -- Done.
vm_state_transitions.nim
.
- [x] ~duplication of computation processes, eg in
execComputation
,applyCreateTransaction
, several comments for refactoring~ -- Merged intosetupComputation
- [x] Stub:
executeTransaction
- [x] Stub:
addTransaction
vm_state.nim
- [x]
mutateStateDB
:- [x] Comments requesting better change handling
- [x] Access logs need updating
header.nim
- [x]
generateHeaderFromParentHeader
:- [x] Compute difficulty
- [x] Add extraData
code_stream.nim
- [ ] Decompile needs some work, eg parameters aren't shown for all opcodes
computation.nim
- [x] ~
getAccountsForDeletion
has TODO comment though seems implemented~ -- Implemented asaccountsForDeletion
iterator. - [x] ~Stub:
getLogEntries
~ -- Implemented inexecComputation
asaddLogs
call
gas_costs.nim
- [ ]
gasCosts
needs logging? Thought logging was implemented? This TODO might need removing. - [x] ~
prefix all_but_one_64th
needs to be deactivated pre-EIP150~ -- Done. - [x]
prefix gasCall
:- [x] Uncertainty over whether to implement costs for:
- [ ] Both input and output (PyEvm)
- [ ] Only largest (Parity)
- [ ] Only one cost (Geth)
- [x] current implementation similar with java-ethereum
- [x] ~Pre-EIP158 question on zero value call costs~ -- No cost.
- [x] Uncertainty over whether to implement costs for:
- [x] ~Stub:
prefix gasSelfDestruct
~ -- Implemented.
opcodes_impl.nim
- [x] ~Request for tests for
CallDataCopy
andCodeCopy
~ -- see test_op_env. - [ ]
returnDataCopy
uncertainty over checking length < 64 - [x] ~
Create
: Implement other fork changes for Homestead and forward~ -- Implemented. - [x]
Call
:- [x] ~Stub for parameters
c_isNewAccount
,c_memOffset
andc_memLength
~ -- Implemented. - [x] ~
ReturnDataSize
,ReturnDataCopy
not working in 32 bit~ -- it works now.
- [x] ~Stub for parameters
- [x] ~
SelfDestruct
: Implement other fork changes, particularly EIP150 and EIP161~ -- Implemented.
transaction_tracer.nim
- [x] ~Log storage~ -- Implemented.
- [ ] investigate the possibility to use nim-json-serialization in place of stdlib-json, see #380
transaction.nim
- [x] stub:
intrinsicGas
precompiles.nim
- [ ]
modExp
:- [ ] Not functional: Fails when base length > 32
- [ ] Negative length not handled
- [x] ~
bn256ecAdd
,bn256ecMul
,bn256ecPairing
: Gas consumption~ -- Implemented.
RPC
p2p.nim
-
[ ] Pending tag -> for referencing pending blocks (pending pool is not implemented)
-
[x] eth_syncing requires peer pool and further work
-
[x] populateReceipt needs fleshing out to get contract address and respond to success/failure
-
[x] Missing or incomplete implementations for VM:
- [x]
eth_sendTransaction
- [x]
eth_sendRawTransaction
- [x]
eth_call
- [x]
eth_accounts
- [x]
eth_estimateGas
- [x]
eth_gasPrice
- [x]
-
[ ] Missing implementations for filters (filtering is not implemented):
- [ ]
eth_newFilter
- [ ]
eth_newBlockFilter
- [ ]
eth_newPendingTransactionFilter
- [ ]
eth_uninstallFilter
- [ ]
eth_getFilterChanges
- [ ]
eth_getFilterLogs
- [ ]
eth_getLogs
- [ ]
-
[ ] Missing implementations for invoking mining (see: https://github.com/status-im/nim-ethash)
- [ ]
eth_mining
- [ ]
eth_hashrate
- [ ]
eth_gasPrice
- [ ]
eth_getWork
- [ ]
eth_submitWork
- [ ]
eth_submitHashrate
- [ ]
whisper.nim
- [ ] Whisper v6 RPCs need implementing
- [x]
shh_version
- [x]
shh_info
- [x]
shh_setMaxMessageSize
- [x]
shh_setMinPoW
- [x]
shh_markTrustedPeer
- [x]
shh_newKeyPair
- [x]
shh_addPrivateKey
- [x]
shh_deleteKeyPair
- [x]
shh_hasKeyPair
- [x]
shh_getPublicKey
- [x]
shh_getPrivateKey
- [x]
shh_newSymKey
- [x]
shh_addSymKey
- [x]
shh_generateSymKeyFromPassword
- [x]
shh_hasSymKey
- [x]
shh_getSymKey
- [x]
shh_deleteSymKey
- [ ]
shh_subscribe
- [ ]
shh_unsubscribe
- [x]
shh_newMessageFilter
- [x]
shh_deleteMessageFilter
- [x]
shh_getFilterMessages
- [x]
shh_post
- [x]
RPC Debugging (needs new module) (See #113 and https://github.com/ethereum/retesteth/wiki/RPC-Methods)
- [x] Tracing:
- [x] ~First part of tracing is present in
transaction_tracer.nim
~ -- Fully implemented intracer.nim
- [x] ~First part of tracing is present in
- [ ] Debug/trace RPCs (selection of these to be implemented)
- [ ]
getClientInfo
- [ ]
setChainParams
- [x] ~
setHead
~ -- Implemented. - [ ]
snapshot
- [ ]
addBlock
- [ ]
rewindToBlock
- [ ]
modifyTimestamp
- [ ]
increaseTime
- [ ]
mineBlocks
- [ ]
exportChain
- [ ]
importRawBlock
- [ ]
ethcallsigs.nim
- [ ] Update rest of signatures to match RPC and use
eth_common
types where possible.
Testing
test_generalstate_json.nim
- [x] ~
testFixtureIndexes
: Use caching db/transactions for call/subcalls. This might be automatically handled inmutateStateDB
itself?~ -- call/subcall pass all test.
test_vm_json.nim
- [x] ~Current testing suite should only support Homestead (See #64)~ -- #373
test_memory.nim
- [ ]
write rejects invalid size
Deactivated due to no POW support in stint, which should now be present - [ ]
write rejects invalid position
needs updating/uncommenting
test_opcode.nim
- [x] ~Only
add
tested! Rest are TODO~ -- #369 - [ ] test_op_memory.nim has some commented test need to be activated
test_precompiles.nim
- [ ] Only checks Frontier, other forks need adding
test_rpc.nim
- [ ] Only checks
eth_getBalance
, implement tests for all RPCs.
External/Modules TODO
P2P
blockchain_sync.nim
- [ ] Stub:
handleLostPeer
mock_peers.nim
- [ ] Stub: Handshake response
peer_pool.nim
- [ ] Stub:
stopAllPeers
Light client
les_protocol.nim
- [ ] Announce: Stub: Handle new block
les_types.nim
- [ ] Stub:
startReqCostVal
Eth Common
eth_types.nim
- [ ] Stub:
genesisHash
- [ ] Stub:
getBlockHeader
(notegetBlockHeader
indb_chain.nim
) - [ ] Stub:
getBestBlockHeader
- [ ] Stub:
getSuccessorHeader
- [ ] Stub:
getBlockBody
- [ ] Stub:
getReceipt
(note implementedgetReceipts
iterator indb_chain.nim
) - [ ] Stub:
getStateDb
- [ ] Stub:
getCodeByHash
- [ ] Stub:
getSetting
- [ ] Stub:
setSetting
- [ ] Stub:
getHeaderProof
- [ ] Stub:
getProof
- [ ] Stub:
getHelperTrieProof
- [ ] Stub:
getTransactionStatus
(note implementedgetBlockTransactions
indb_chain.nim
) - [ ] Stub:
addTransactions
(note implementedgetBlockTransactions
indb_chain.nim
) - [ ] Stub:
persistBlocks
(notepersistHeaderToDb
inchain.nim
)