thenewboston-blockchain / thenewboston-python

Python library for thenewboston digital currency.
https://thenewboston.com
MIT License
104 stars 35 forks source link

Confirmation blocks to include block number #55

Open buckyroberts opened 3 years ago

buckyroberts commented 3 years ago

Add block_number to confirmation blocks. This will simplify synchronization across nodes and also allow us to use our updated time model which is based on block_number.

We also need to keep the most recent block_number in cache, similar to how we do for HEAD_BLOCK_HASH. This is because the system will need to know that value in order to increment it every time a new block is created.

HEAD_BLOCK_HASH overview

Confirmation block API docs

The resulting shape of a confirmation block would look similar to this.

Screen Shot 2021-02-07 at 5 22 32 PM