Comments (2)
I'm reviewing this issue and I need a little help, I don't fully understand the code.
From what I see, the checksum is a merkle tree of all records in buckets BlockPath, CoinOutputs, BlockStakeOutputs, and buckets prefixed dco_ and fcex_.
The comparison is done between the checksum at the time the parent block was added and the parent block as it is now, but don't understand why the parent is forked from the consensus as the parent is already in the consensus. Maybe just removing the current should be enough ?
I understand that CoinOutputs may have changed, as current block has been processed but the fork only reverts blocks, nothing more, so CoinOutputs does not seem to reflect the changes done forking the consensus as the block spending may not be equal between parent and current. Same for BlockStakeOutputs.
Should it be a possible solution to revert Coins and BlockStake to its original position before doing the consensuschecksum ?
Or, as doing a consensuschecksum now is a very costly operation (reading all records from at least 3 buckets) calculated for every new block added and sometimes (every 1000 blocks randomly) and it will be costlier when this thing is 20 years running, maybe we should think on another cheaper way to guarantee the consistency of the consensus
Should the consensusChecksum be changed for a checking of only BlockPath, as from what I understand, CoinOutputs and BlockStakeOutputs are derived from the blocks on BlockPath and verifiable just reading the BlockPath.
Not sure everything I've written make any sense, but any light about this that may help me solve this issue is greatly appreciated.
from rivine.
Still present. The problem is that whenever a block is applied, there is also some "maintenance". This is mainly the addition of the delayed outputs to the consensus set, and removing the delayed bucket. But when the block is reverted, there seems to be no such action which restores the delayed bucket. As a result, the consensus set id (which also takes the values from these buckets) is wrong
from rivine.
Related Issues (20)
- R&D explorer HA load balancing solution that works for all rivine-based chains HOT 15
- provide GraphQL explorer module for rivine (shorthand: q) HOT 20
- R&D if we can use storm to enhance our performance of Rivine's boltDB usage HOT 1
- R&D wallet module design and possible refactor HOT 1
- Stop block creators from knowingly creating blocks in the past HOT 4
- research dragonchain HOT 1
- Research how a rivine private key can be used in Stellar HOT 3
- better algorithm for output selection required HOT 12
- Front caddy proxy failover
- rivinecg generate blockchain fails HOT 4
- rivinecg: default generated client does not compile HOT 3
- travis no longer executes go tests HOT 1
- research cardano HOT 1
- Make rivine available as a go module
- review block structure HOT 2
- Implement a better reference output selection
- travis fails on the examples/rivchain job
- Convert rivine/research/stellar/examples to python HOT 2
- Convert rivine/research/stellar/examples to other javascript HOT 2
- authcoin extension by default authorized using the reverse property does not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rivine.