slingshot
slingshot copied to clipboard
Node architecture
Node consists of several independent tasks:
- BC: Blockchain state machine with its network-agnostic interface for processing blocks and supplying notifications about new transactions.
- P2P: network component that manages the peers and communicates with the BC.
- API: warp-powered JSON/RPC interface that provides API for submitting txs, querying network status etc. Communicates with BC and P2P.
- UI: warp-powered UI available on 127.0.0.1 for local operations: viewing the blockchain, crafting transactions. Communicates with BC and P2P.
Checklist
- [x] wallet: new format (#473)
- [x] review the state machine for the utxos: incoming, outgoing, confirmed txs, unconfirmed txs.
- [x] persist unconfirmed txs, retry adding them to the mempool on start, clear when they are confirmed.
- [x] save/load wallet state from a file (json-encoded or w/e) - we can switch to a more PITA sqlite later.
- [ ] ui: new navigation in the header (instead of sidebar) - so it scales better for various device sizes.
- [ ] ui: init blockchain by creating 1'000'000 default units in a default account in the wallet. These can be used to make new transactions later.
- [ ] p2p: make sure the hello message includes the network's genesis block hash, to make sure both nodes communicate on the same ledger.
- [ ] blockchain: store utreexo state in one file, and blocks in a separate folder for serving to the other nodes.
@stfung77 do you want to assign this issue to yourself if you're taking this on?