New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current TODO items for 1.0 #177

Open
coffeepots opened this Issue Nov 19, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@coffeepots
Member

coffeepots commented Nov 19, 2018

Nimbus 1.0 TODO

Summary

Meta-issue of the currently known work remaining to reach 1.0.

Chain, State & VM

  • Missing functionality:
    • Fetch block bodys (See #126)
    • Fetch proofs
    • Fetch settings
  • Gas costs intricacies and estimation
  • Fork differences in VM & edge cases (particularly with Call & Create) (See #121 and #123)
  • Missing transaction pending pool
  • Transaction logging and retrieval
  • Mining
  • Filtering functionality for working with RPC filters
  • 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,018)
  • RPC internal integration where appropriate & comprehensive test suite
  • Small additions to sync and LES
  • IP 6 support

Misc

  • Whisper
  • EVMC support (See #114)
  • Truffle support (See #103)
  • Sharable debugging and testing environment (See #172)
  • Block validation tool (See #171)
  • Fuzzy testing & Sanitisation (See #164)

Missing Important Functionality

  • DB_Chain:
    • Stub: getBlockBody
    • Stub: getBlockTransactionHashes
  • Chain:
    • processTransaction must run VM
  • VM_State_Transitions:
    • Stub: executeTransaction
    • Stub: addTransaction
  • Header:
    • generateHeaderFromParentHeader difficulty calculation & data
  • P2P:
    • Stub: handleLostPeer
    • Stub: Handshake response (mock peers)
  • LES
    • Announce must handle a new block
  • Eth_Common
    • 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

  • Journal DB integration
  • Stub: getBlockBody (reads block body from hash)
  • Stub: getBlockTransactionHashes (iterates over transaction hashes for specified block)
  • setAsCanonicalChainHead doesn't re-add transaction to internal pending pool if local sender

state_db.nim

  • newAccountStateDB ignores the read only flag
  • AccountStateDB.rootHash= No way to set roothash

genesis.nim

  • Support genesis blocks for KovanNet and MordenNet. CustomNet?

chain.nim

  • processTransaction needs to run the VM for a contract call, perhaps needs refactoring to use computation

vm_state_transitions.nim

  • duplication of computation processes, eg in execComputation, applyCreateTransaction, several comments for refactoring
  • Stub: executeTransaction
  • Stub: addTransaction

vm_state.nim

  • mutateStateDB:
    • Comments requesting better change handling
    • Access logs need updating

header.nim

  • generateHeaderFromParentHeader:
    • Compute difficulty
    • Add extraData

code_stream.nim

  • Decompile needs some work, eg parameters aren't shown for all opcodes

computation.nim

  • getAccountsForDeletion has TODO comment though seems implemented
  • Stub: getLogEntries

gas_costs.nim

  • gasCosts needs logging? Thought logging was implemented? This TODO might need removing.
  • prefix all_but_one_64th needs to be deactivated pre-EIP150
  • prefix gasCall:
    • Uncertainty over whether to implement costs for:
      • Both input and output (PyEvm)
      • Only largest (Parity)
      • Only one cost (Geth)
    • Pre-EIP158 question on zero value call costs
  • Stub: prefix gasSelfDestruct

opcodes_impl.nim

  • Request for tests for CallDataCopy and CodeCopy
  • returnDataCopy uncertainty over checking length < 64
  • Create: Implement other fork changes for Homestead and forward
  • Call:
    • Stub for parameters c_isNewAccount, c_memOffset and c_memLength
    • ReturnDataSize, ReturnDataCopy not working in 32 bit
  • SelfDestruct: Implement other fork changes, particularly EIP150 and EIP161

transaction_tracer.nim

  • Log storage

transaction.nim

  • stub: intrinsicGas

precompiles.nim

  • modExp:
    • Not functional: Fails when base length > 32
    • Negative length not handled
  • bn256ecAdd, bn256ecMul, bn256ecPairing: Gas consumption

RPC

p2p.nim

  • Pending tag -> for referencing pending blocks (pending pool is not implemented)

  • eth_syncing requires peer pool and further work

  • populateReceipt needs fleshing out to get contract address and respond to success/failure

  • Missing or incomplete implementations for VM:

    • eth_sendTransaction
    • eth_sendRawTransaction
    • eth_call
    • eth_accounts
    • eth_estimateGas
    • eth_gasPrice
  • 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 RPCs need implementing
    • shh_version
    • shh_post
    • shh_newIdentity
    • shh_hasIdentity
    • shh_newGroup
    • shh_addToGroup
    • shh_newFilter
    • shh_uninstallFilter
    • shh_getFilterChanges
    • shh_getMessages

RPC Debugging (needs new module) (See #113 and https://github.com/ethereum/retesteth/wiki/RPC-Methods)

  • Tracing:
    • First part of tracing is present in transaction_tracer.nim
  • Debug/trace RPCs (selection of these to be implemented)
    • getClientInfo
    • setChainParams
    • setHead
    • 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

  • testFixtureIndexes: Use caching db/transactions for call/subcalls. This might be automatically handled in mutateStateDB itself?

test_vm_json.nim

  • Current testing suite should only support Homestead (See #64)

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

  • Only add tested! Rest are TODO

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 (note getBlockHeader in db_chain.nim)
  • Stub: getBestBlockHeader
  • Stub: getSuccessorHeader
  • Stub: getBlockBody
  • Stub: getReceipt (note implemented getReceipts iterator in db_chain.nim)
  • Stub: getStateDb
  • Stub: getCodeByHash
  • Stub: getSetting
  • Stub: setSetting
  • Stub: getHeaderProof
  • Stub: getProof
  • Stub: getHelperTrieProof
  • Stub: getTransactionStatus (note implemented getBlockTransactions in db_chain.nim)
  • Stub: addTransactions (note implemented getBlockTransactions in db_chain.nim)
  • Stub: persistBlocks (note persistHeaderToDb in chain.nim)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment