Comments (1)
I am wondering if there is a real reason to pursue this approach with UTxOHD being around the corner? I assume it would solve this issue of unnecessary memory overhead, right?
An open question is if this can be supported without major changes to ledger. My assumption is that it can.
Unfortunately support for this would require significant changes. It could theoretically be done, but it would add quite a bit of complexity to the already complex rules, because we would have to track in the ledger rules all the parts that would need to not be applied to the ledger state on a specific flag. The biggest reason why I would oppose this change is that, besides ignoring certain state modifications, we would also have to perform some validations conditionally on this flag, which all together sounds too dangerous to me.
I think I can suggest an alternative approach that might work for db-sync. Namely to employ some postprocessor that would strip out the unnecessary parts from the state after applying a block. The only required trick for this to work is that all ledger validation has to be turned off, i.e reapplyBlock
is not sufficient, because it still performs some validations. So applyBlock
has to be called with NoValidation
, cause otherwise predicate failures like ValueNotConservedUTxO
will be triggered. In other words it would work like that:
- apply a block without validations to a stripped down state
- look into transactions in the block and collect redundant data that they could have added to the state
- remove that data from the state.
My suggestion would allow for ledger not to worry about this optimization that is not relevant for the chain safety and performance and it would allow for the team to stay sane working on those rules.
The ledger reapplication should work and reach a correct ledger state without relying on unecessary data. Also making it easier to create a ledger state could be used for debugging.
This use case is not accurate at all. We do need all data in order to reach the correct state. It is just that db-sync's view differs from the one that node and ledger have about what correct state actually means 🙂
There is plenty of data on chain that is not relevant for ledger, eg aux data, anchors, etc. Almost none of it is stored in the ledger state precisely because it is not relevant for ledger.
from cardano-ledger.
Related Issues (20)
- Add plutus tests
- conway.cddl costmdls clarification HOT 1
- Fix minor bugs in `CHAIN` of Shelley formal spec
- Epoch
- Do pulsing on ticks that don't have blocks
- CDDL specs for ledger state queries
- Remove unnecessary constructors from `UMElem`
- Switch to using Plutus testingCostModels instead of zero models in Tests HOT 1
- Clarification on MinFeeRefScriptCostPerByte HOT 4
- Use separate serialization/types for ledger queries
- SanchoNet tx incompatible with Conway CDDL HOT 3
- Conway conformance track
- Translate: RATIFY
- Conformance test plumbing: `NEWEPOCH`
- Missing Documentation per OSC Governance HOT 3
- simplify?: voter CDDL HOT 1
- `transaction build` no longer checks datum for PlutusV1 and PlutusV2 spending scripts HOT 1
- Translate: GOVCERT
- POOL: Translate and Adjust
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 cardano-ledger.