Skip to content
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

IF: Safely persist HotStuff state #1521

Closed
Tracked by #1508
arhag opened this issue Aug 17, 2023 · 3 comments · Fixed by #1578
Closed
Tracked by #1508

IF: Safely persist HotStuff state #1521

arhag opened this issue Aug 17, 2023 · 3 comments · Fixed by #1578
Assignees

Comments

@arhag
Copy link
Member

arhag commented Aug 17, 2023

Critical state should be persisted at the right time in the consensus process so that the algorithm remains safe even if the nodeos process is restarted. Ideally, it should remain safe even if the nodeos process is killed, though this may become a fast follow issue. Being safe even after machine power failure is not in scope for this issue.

The goal should be that an honest block finalizer does not send out signatures on proposals that can contribute towards a finality violation (even if not enough other block finalizers are doing the same to make an actual finality violation occur).

@heifner
Copy link
Member

heifner commented Aug 24, 2023

// writing
fc::cfile pfile;
pfile.set_file_path(file_path);
pfile.open(fc::cfile::truncate_rw_mode);
auto data = fc::raw::pack(stuff);
pfile.write(data.data(), data.size());
pfile.flush(); // only needed if not closing
pfile.close(); // or let destructor do it
// reading
fc::cfile pfile;
pfile.set_file_path(file_path);
pfile.open("rb");
auto ds = pfile.create_datastream();
fc::raw::unpack(ds, stuff);
pfile.close(); // or let destructor do it

@heifner
Copy link
Member

heifner commented Sep 11, 2023

Along with the critical information stored for hotstuff.
The hs_commitment needed by #1586.
The active finalizer set. (implicit that hotstuff is activated)
The current LIB of hotstuff.

@arhag arhag removed this from the Leap v5.0.0-rc1 milestone Sep 19, 2023
@BenjaminGormanPMP
Copy link

Prioritized for iteration.

@bhazzard bhazzard added this to the Leap v6.0.0-rc1 milestone Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants