Dero Web Wallet derosuite. This repo contains changes required for webwallet. With this changes any Dero daemon can become web wallet. All changes are related to daemon rpc server and wallet to make it light and faster.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Captain Dero b766eab41a Derosuite for Dero Web Wallet initial commit 2 years ago
..
inputmaturity Derosuite for Dero Web Wallet initial commit 2 years ago
mempool Derosuite for Dero Web Wallet initial commit 2 years ago
rpcserver Derosuite for Dero Web Wallet initial commit 2 years ago
alt_blocks.go Derosuite for Dero Web Wallet initial commit 2 years ago
block_chain_input.go Derosuite for Dero Web Wallet initial commit 2 years ago
blockchain.go Derosuite for Dero Web Wallet initial commit 2 years ago
blockheader.go Derosuite for Dero Web Wallet initial commit 2 years ago
caller.go Derosuite for Dero Web Wallet initial commit 2 years ago
const.go Derosuite for Dero Web Wallet initial commit 2 years ago
create_miner_tx.go Derosuite for Dero Web Wallet initial commit 2 years ago
create_miner_tx_test.go Derosuite for Dero Web Wallet initial commit 2 years ago
create_miner_tx_test.go1 Derosuite for Dero Web Wallet initial commit 2 years ago
difficulty.go Derosuite for Dero Web Wallet initial commit 2 years ago
difficulty_test.go Derosuite for Dero Web Wallet initial commit 2 years ago
genesis.go Derosuite for Dero Web Wallet initial commit 2 years ago
genesis_test.go Derosuite for Dero Web Wallet initial commit 2 years ago
hardfork_core.go Derosuite for Dero Web Wallet initial commit 2 years ago
hardfork_core_test.go Derosuite for Dero Web Wallet initial commit 2 years ago
median.go Derosuite for Dero Web Wallet initial commit 2 years ago
median_test.go Derosuite for Dero Web Wallet initial commit 2 years ago
miner_block.go Derosuite for Dero Web Wallet initial commit 2 years ago
outputs_index.go Derosuite for Dero Web Wallet initial commit 2 years ago
readme.txt Derosuite for Dero Web Wallet initial commit 2 years ago
scores_test.go Derosuite for Dero Web Wallet initial commit 2 years ago
store.go Derosuite for Dero Web Wallet initial commit 2 years ago
transaction_verify.go Derosuite for Dero Web Wallet initial commit 2 years ago
tx_fees.go Derosuite for Dero Web Wallet initial commit 2 years ago

readme.txt

The blockchain is stored as follows, assuming genesis block is stored

each block has a single child to store main chain
each block can have multiple children to store numerous blocks as alternative


each block stores the following extra info
1) height
2) single parent
3) cumulative difficulty
4) size of block ( size of all transactions included within block + size of block )
5) timestamp
6) cumulative coins
7) block blob itself
8) child
9) multiple children ( alternative or orphan blocks )

storing block mean storing all attributes except child/children
connecting a block means setting child/children attributes properly


imagine the chain as a doubly linked list, with traversal possible using blockids as ptrs

the psedo code is as follows

1) verify incoming blockor semantic errors
2) verify block pow
3) verify each and every transaction for correctnes
4) store the transactions
5) store the block, height, cumulative difficulty, coins emission etc
6) check whether block is the new top,
7) if yes,update main chain
8) if not we have to do chain reorganisation at the top
9) choose the block with higher poW as new top
10) push alt chain txs to mem pool after verification
11) if block is being added somewhere in the middle, find the chain with higher Pow as main chain
12) push the orphan block txs to mempool after verification