Comments (2)
Yes, this is very close to what I had in mind (and what I sketched in an earlier IBC paper). Much more generic (given those golang structs are translated to protobuf).
The PrependLengthOp
is not needed. As you see there is already a prefix such as or Height + Size + Version
which can be processed by the client. You can just add the length there.
So, we have eg. Prefix: Height + Size + Version + Length
, Key
, Suffix: Right
And the HashConcatOp
should be able to handle any inner node.
We would need another type for leaf nodes that takes Key, Value as well-defined fields (so we know what is being proven) and then performs some ops on it. I don't have that function in mind, but probably could be formed with one other generic operator in addition to HashConcatOp
.
The main problem with this currently is that such a proof seems incompatible with the ProofOp as defined in the tendermint api.
Unless we can figure a way to map your above constructs onto that, it will be a breaking change in tendermint and the rpc api.
from iavl.
I think it is better to have PrependLengthOp
, even that the length of the input value is fixed in our case(SHA256 hashed), in general case the length may vary so we cannot determine which length bytes we have to prepend at the proof generation time. I'm also in favor of splitting HashConcatOp
into SHA256Op
(which is the same thing with HashValueOp
above) and ConcatOp
, so we can add other hash functions later too(for other merkle tree types)
ProofOp.data
is just a dynamically serialized operator struct which the receiver will decode with ProofOpDecoder
function. The only thing we need to implement is the encoder/decoder function for each of the operator types, which does not break the current api.
from iavl.
Related Issues (20)
- Async Commit HOT 1
- nodeDb.DeleteVersionsFrom can leave mutex locked indefinitely hence a deadlock
- [Epic]: IAVL v2 implementation HOT 1
- Post-order snapshot HOT 4
- Tree diff (IAVL v1 design)
- Historical proofs & changelog replay
- Refactor the pruning logic in V1 HOT 1
- Add a metric to track state size HOT 3
- Why got error: orphan expires before it comes alive. 41 > 40. HOT 3
- [Question] About leaf and inner nodes and how they change
- Lazy Pruning HOT 3
- Change IAVL node.writeBytes to take in bytes.Buffer HOT 3
- meaningless cache adding in the pruning
- CacheMultiStoreWithVersion -> store.(*iavl.Store).GetImmutable(version) error: "version does not exist"
- PANIC: in node.go func (node *Node) String() string
- `UnsetCommitting` is not idemptont
- Root hash breaking change in v1.x.x HOT 4
- Stop pruning Go routine on close
- make install error
- GitHub releases are outdated 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 iavl.