Skip to content
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
Open

Current TODO items for 1.0 #177

coffeepots opened this issue Nov 19, 2018 · 0 comments
Labels

Comments

@coffeepots
Copy link
Contributor

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

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

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. -- Implemented via ReadOnlyStateDB.
  • AccountStateDB.rootHash= No way to set roothash -- Implemented.

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 -- Done.

vm_state_transitions.nim

.

  • duplication of computation processes, eg in execComputation, applyCreateTransaction, several comments for refactoring -- Merged into setupComputation
  • 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 -- Implemented as accountsForDeletion iterator.
  • Stub: getLogEntries -- Implemented in execComputation as addLogs call

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 -- Done.
  • prefix gasCall:
    • Uncertainty over whether to implement costs for:
      • Both input and output (PyEvm)
      • Only largest (Parity)
      • Only one cost (Geth)
      • current implementation similar with java-ethereum
    • Pre-EIP158 question on zero value call costs -- No cost.
  • Stub: prefix gasSelfDestruct -- Implemented.

opcodes_impl.nim

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

transaction_tracer.nim

transaction.nim

  • stub: intrinsicGas

precompiles.nim

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

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 v6 RPCs need implementing
    • shh_version
    • shh_info
    • shh_setMaxMessageSize
    • shh_setMinPoW
    • shh_markTrustedPeer
    • shh_newKeyPair
    • shh_addPrivateKey
    • shh_deleteKeyPair
    • shh_hasKeyPair
    • shh_getPublicKey
    • shh_getPrivateKey
    • shh_newSymKey
    • shh_addSymKey
    • shh_generateSymKeyFromPassword
    • shh_hasSymKey
    • shh_getSymKey
    • shh_deleteSymKey
    • shh_subscribe
    • shh_unsubscribe
    • shh_newMessageFilter
    • shh_deleteMessageFilter
    • shh_getFilterMessages
    • shh_post

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 -- Fully implemented in tracer.nim
  • Debug/trace RPCs (selection of these to be implemented)
    • getClientInfo
    • setChainParams
    • 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

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

test_vm_json.nim

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

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
Labels
Projects
None yet
Development

No branches or pull requests

2 participants