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

Clean up the structure of round state.bin #384

Open
poszu opened this issue Sep 11, 2023 · 1 comment
Open

Clean up the structure of round state.bin #384

poszu opened this issue Sep 11, 2023 · 1 comment

Comments

@poszu
Copy link
Contributor

poszu commented Sep 11, 2023

The round state file contains many fields that are not required anymore:

type persistedRoundState struct {
	SecurityParam uint8
	Members       [][]byte // Deprecated
	Statement     []byte
	ParkedNodes   [][]byte // Deprecated
	NumLeaves     uint64
	NIP           *shared.MerkleProof
}

To remove:

  • Members
  • ParkedNodes

Questionable fields:

  • NIP: The round data (including the state) is removed shortly after finishing,
  • SecurityParam: It's currently hardcoded in the PoET binary anyway, and it can be decided when the proof is created

Also, the serialization format could be changed to a human-readable format like JSON for:

  • easier maintenance (fixing hard failures),
  • easier structure changing without the need for extra migration code if not necessary.

💡 Migration will be required to make sure that already deployed poets can upgrade easily.

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Dev team kanban Sep 11, 2023
@lrettig lrettig changed the title Clean the structure of round state.bin up Clean up the structure of round state.bin Oct 17, 2023
@bansaltushar014
Copy link

Hi @poszu ,

Could you please clarify about the Questionable fields?

Are these yet to finalise or some research work is pending on those?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants