Comments (13)
Implement a system to monitor and record state changes of the blockchain during block commits.
Just reuse MPT with full history. NeoGo can rollback using exactly that. We will need MPT embedded anyway for #1526.
from neo.
Implement a system to monitor and record state changes of the blockchain during block commits.
Just reuse MPT with full history. NeoGo can rollback using exactly that. We will need MPT embedded anyway for #1526.
unfortunately, we will not have mpt for ordinary node. why? because it would require a whole resync of the chain again to calculate the tree. using mpt is really good, we should have it integrated at the very begining. but now its unnecessary as neo has adopted statevalidators solution, and new 'stateroot' solution should based on that. we shall never require another whole chain resync.
from neo.
oh by the way, i am curious how mpt can achieve rollback? isnt it a store tree? how come it can have history data?
update: get that already.
from neo.
Another BTW, this is a plugin~~~~ technically, user will not use it unless they know that it is and they install it.
from neo.
Do you think core
should save the TriggerType.OnPersist
and TriggerType.PostPersist
application_executed
states? Pointless to process them to just reprocess them again in ApplicationLogs
from neo.
Do you think
core
should save theTriggerType.OnPersist
andTriggerType.PostPersist
application_executed
states? Pointless to process them to just reprocess them again inApplicationLogs
this pr only solve one problem, which is rollback the ledger. taking care of other plugins can be solved in other prs. that is why i make this feature a plugin, we can keep updating it without breaking anything.
previously i had a complete system that handles all plugin store, but just too big to get reviewed.
from neo.
Implement a system to monitor and record state changes of the blockchain during block commits.
Just reuse MPT with full history. NeoGo can rollback using exactly that. We will need MPT embedded anyway for #1526.
unfortunately, we will not have mpt for ordinary node. why? because it would require a whole resync of the chain again to calculate the tree. using mpt is really good, we should have it integrated at the very begining. but now its unnecessary as neo has adopted statevalidators solution, and new 'stateroot' solution should based on that. we shall never require another whole chain resync.
You will need to resync
from neo.
Implement a system to monitor and record state changes of the blockchain during block commits.
Just reuse MPT with full history. NeoGo can rollback using exactly that. We will need MPT embedded anyway for #1526.
unfortunately, we will not have mpt for ordinary node. why? because it would require a whole resync of the chain again to calculate the tree. using mpt is really good, we should have it integrated at the very begining. but now its unnecessary as neo has adopted statevalidators solution, and new 'stateroot' solution should based on that. we shall never require another whole chain resync.
You will need to resync
totally up to the solution, if we have a solution that can be applied at any moment and not require a resync, why would we choose a resync one? and this plugin takes effect when it is installed, no resync is needed at all, unless user want to rollback to revious blocks, but that should not be a concern of this plugin cause he can simply resync the chain as before. this plugin is for answering the question of some plugin falls back the mainchain and miss some block states.
from neo.
but now its unnecessary as neo has adopted statevalidators solution, and new 'stateroot' solution should based on that.
This part I can't understand.
this plugin is for answering the question of some plugin falls back the mainchain and miss some block states.
Plugin to restore plugins? Who is going to use it?
from neo.
but now its unnecessary as neo has adopted statevalidators solution, and new 'stateroot' solution should based on that.
This part I can't understand.
Neo has statevalidators, we can use them to calculate a state root for every single block, then broadcast/share it, other nodes can also calculate its own state root for that block, then compare with statevalidators'. No need to calculate a global stateroot at all, no need to resync at all. As long as we ensure block leverl state consistancy, we ensure the global state consistancy.
We may switch to MPT in the future, but currently, i think we should avoid resync. With block-level MT being calculated and stored, we can have an official snapshot at some height, then those existing node can calculate MPT based on that snapshot and its local MTs without resyning anything.
That is ->
- Block leverl MT
- Snapshot (MPT) + MT
- MPT
this plugin is for answering the question of some plugin falls back the mainchain and miss some block states.
Plugin to restore plugins? Who is going to use it?
Whoever think its useful. its plugin, not something integrated into the core.
First of all i dont think plugin restore plugin has any issue at all. As long as it works efficiently and solves the issue.
Then, its not plugin restoring plugin, rollback plugin works on ledger, moves ledger backwards, it does not communicate, nor interoperate with other plugins.
from neo.
we can use them to calculate a state root for every single block, then broadcast/share it,
This is done already (but neo-project/neo-modules#536 and #2374 (comment)).
other nodes can also calculate its own state root for that block, then compare with statevalidators'
You wouldn't believe, but that's exactly what NeoGo does.
No need to calculate a global stateroot at all
I'd be interested in alternative to #2373 without in-header state root. Snapshots can help somewhat (hi, #1286), but the question is --- why should we trust them?
Although all of this discussion is better for #1526.
from neo.
This is done already (but neo-project/neo-modules#536 and #2374 (comment)).
This is awesome.
You wouldn't believe, but that's exactly what NeoGo does.
Nothing wont i believe neogo has it, you basically have discussed all problems that i am concering now.
I'd be interested in alternative to #2373 without in-header state root. Snapshots can help somewhat (hi, #1286), but the question is --- why should we trust them?
Although all of this discussion is better for #1526.
What i have in mind is exactly not in-header, but directly p2p/rpc validation. as to why should we trust them, very simple, we hardcode snapshot state root into the core. Its public and anyone can challenge that.
from neo.
as to why should we trust them, very simple, we hardcode snapshot state root into the core
What core? Node source code?
from neo.
Related Issues (20)
- [Neo Core Event] Define Interfaces for Core Event Handlers
- Comments for Tarjan class HOT 2
- Quality of life CLI options --config-file & --ignore-plugin-network HOT 4
- Add Unit Tests for RpcServer Plugin
- dotnet publish doesn't work in plugin's project path HOT 4
- Wrong debug/release path of plugins HOT 3
- RpcServer Unit Tests: Node
- Leveldb exception handle HOT 26
- version error 1.0.0 HOT 1
- Allow list of AnomalyTransaction types vs Explicit Hardfork HOT 1
- Should native contracts be destroyable? HOT 2
- Work on a DEV branch.
- List Plugins Display Showing Wrong Files HOT 3
- Extend applicationlogs with invocations HOT 11
- Extend `Designated` native RoleManagement events with old/new public keys
- Extend `getversion` RPC response with additional protocol settings HOT 5
- Add support to verify message without hashing HOT 2
- RockDb FileNotFoundException HOT 3
- Exception handle mechanism for Plugins/Modules HOT 2
- Improve session mechanism
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 neo.