name | category |
---|---|
Layers |
Purpose: the networking daemon must be able to connect to other Ethereum nodes, and accept and share data, so as to serve as the backbone for the Ethereum network. The daemon itself should be as neutral as possible; ideally, it should be useful as part of any currency or cryptographic protocol without modification. It should include anti-DDoS features; perhaps maintain a running score preventing any single IP from making more than one request per second.
Interface:
- every time the daemon receives a new message (ie. H(M) is not equal to H(Mprev) for any Mprev received previously), it should send a POST request to http://localhost: containing the data, where outputport can be set in the ~/.ethereum/ethereum.conf file (default 1242 if not set)
- the daemon should listen on port , where inputport can be set in the ~/.ethereum/ethereum.conf file (default 1243 if not set), and if it receives a message in a post request it should push the data out to all connected nodes in the network. Dependencies: internet, bootstrapping nodes
- Process_network_message(string) -> msg or transaction or block
- Create_network_message
- Insert object(value) (key = sha256(value))
- Get object (key) -> value
- get_transaction
- get_block
- get_address_balance / nonce
- get_contract_memory_at_index
- get_contract_root
- get_object (Merkle trie nodes, etc)
- block class
- transaction class
- get_latest_block
- add_block (including validation and total difficulty calculation)
- apply_transactions_to_block (for miners)
- Wallet
- Full
- SPV
- Graphical block explorer
- Miner
Purpose: the block class should be able to parse blocks, serialize blocks and handle certain updating operations to blocks.
Interface:
- deserialize: string -> void (constructor)
- get_balance: number address -> number
- get_contract_state: number address, number index -> number
- update_balance: number address, number newbalance -> void
- update_contract_state: number address, number index, number newvalue -> void
- get_contract_size: number address -> number
- serialize: void -> string
Purpose: the transaction class should be able to parse transactions, sign transactions and serialize transactions. Note that the serialize method should fail for transactions without a signature; transactions that are created inside a block and not deserialized should never actually be stored or serialized in any form.
Interface:
- deserialize: string -> void (constructor)
- sign: privkey -> void
- serialize: void -> string
- create: number address, number value, number fee, array[number] data -> void (constructor)
- hash: void -> number
- to, from, value, fee, data (accessible and settable member variables)