rainblock / rainblock-protocol Goto Github PK
View Code? Open in Web Editor NEW☔️🚀Protocol Buffers for Rainblock
License: Apache License 2.0
☔️🚀Protocol Buffers for Rainblock
License: Apache License 2.0
Verifier should send a minimal set of update operations for a block of transactions.
For example:
Case-1: If a block contains multiple transactions updating an account's value:
Verifier should send one `ValueChangeOp` corresponding to the updated account
Case-2: If a block contains multiple transactions updating the account's storage:
Verifier should send one `ExecutionOp` reflecting all the `StorageUpdates`
Case-3: If a block contains multiple transactions updating an account's value and
has one final transaction that deletes the account:
Verifier should send one `DeletionOp`
Case-4: If an account is created and updated by multiple transactions in the same block:
Verifier should send one create-op corresponding to the updated balance and nonce
And similarly for other operations...
Storage currently assumes that one update operation is sent per account. We need this to reduce the UpdateMsg size and the RPC serialization/deserialization overheads as well.
For supporting this; we need CreateOp to have nonce field and update the verifier accordingly.
Let me know your thoughts @no2chem
If an account is deleted and re-created by the transactions within the same block with new code, the UpdateOp is similar to modifying an existing account's code. Is this okay?
// Used for each update to the node's merkle tree.
message UpdateOp {
bytes account = 1; // 20 bytes, BE account number
bytes balance = 2; // 32 bytes, BE new balance. May not be present if the balance is unchanged.
uint32 updates = 3; // Increment by one for each nonce update. May not be present if the nonce is unchanged.
repeated StorageUpdate storage_update = 4; // Storage updates, if any.
bytes code = 5; // Code bytes, only applicable for creation of a contract account.
bool deleted = 6; // Set if the account was deleted. All other fields, if present, are ignored.
}
Also, if the previous account had nonce n; and we delete the account and create a new account with the same address: how will the nonce be set to 0 for the new account if all that the verifier is sending are updates?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.