MinaProtocol / mina

Mina is a cryptocurrency protocol with a constant size blockchain, improving scaling while maintaining decentralization and security.
https://minaprotocol.com
Apache License 2.0
1.99k stars 529 forks source link

Refactor: Fix transition router switch logic #1473

Open nholland94 opened 5 years ago

nholland94 commented 5 years ago

Existing transition router switch logic is fragile. @nholland94 would like to fix it up. In particular

  1. It's not clear that pipes are always closed in the right way.
  2. The rules for switching between participation + bootstrap are not obviously correct.
imeckler commented 5 years ago

@nholland94 if @ghost-not-in-the-shell 's recent changes don't address this issue as far as you're concerned, could you make another more specific issue?

nholland94 commented 5 years ago

@imeckler Jiawei ended up just trying to patch the logic as it was rather than doing a full refactor. The necessary refactor is still an open issue.

nholland94 commented 5 years ago

This work will soon be required due to changes in the transition frontier initialization logic that need some new state management logic in the transition router.

nholland94 commented 4 years ago

@imeckler we are still encountering bugs due to this work not being done. Recently @mrmr1993 encountered yet another closed pipe issue. I don't think we should close this issue.

emberian commented 9 months ago

Maybe we can take some inspiration from how openmina architects their stuff around reducers to try and clean this up?