-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Towards validator recovery, 1-to-1 Entry to Blob #397
Conversation
src/ledger.rs
Outdated
use std::mem::size_of; | ||
use transaction::Transaction; | ||
|
||
// a Block is a vector of Entries |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a slice of Entries
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ack
src/entry.rs
Outdated
entry | ||
} | ||
|
||
/// Creates the next entries for given transactions, outputs | ||
/// updates start_hash to id of last Entry, sets cur_hashes to 0 | ||
pub fn from_transactions_mut( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this should be in ledger.rs, where Block is defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed, refactoring
src/tvu.rs
Outdated
while let Ok(msg) = r_reader.recv_timeout(timer) { | ||
println!("msg #{}: {:?}", i, msg); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print before trace of the same msg?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
leftovers from debugging
Can you update the PR description to offer more context? |
baac1da
to
e0eca1b
Compare
incorporated the "Cleanup entry" PR as well as I could... will continue to clean this up tomorrow... |
speed of serialization/deserialization on master: |
* limit the number of Tntries per Blob to at most one * limit the number of Transactions per Entry such that an Entry will always fit in a Blob With a one-to-one map of Entries to Blobs, recovery of a validator is a simple fast-forward from the end of the initial genesis.log and tx-*.logs Entries. TODO: initialize validators' blob index with initial # of Entries.
hoping this looks like a "ready" part one
feedback appreciated.
issue #309 part 1
always fit in a Blob
With a one-to-one map of Entries to Blobs, recovery of a validator
is a simple fast-forward from the end of the initial genesis.log
and tx-*.logs Entries.
TODO: initialize validators' blob index with initial # of Entries.