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

fix(fork): drs upgrade when multiple forks fix #1266

Merged
merged 11 commits into from
Dec 8, 2024
Merged

Conversation

srene
Copy link
Contributor

@srene srene commented Dec 4, 2024

PR Standards

The objective of this PR is to fix detected issues in forking process:

  • Stop condition modified to avoid stopping active proposers when submitting fork batch is wrong, rolled back to previous and added mutex.
  • fork for deprecated drs for rollapps with multiple forks did not work because instruction file could have info from wrong fork (for previous height and not next height). its been fixed by getting always fork data from hub using current height.

Opening a pull request should be able to meet the following requirements

--

PR naming convention: https://hackmd.io/@nZpxHZ0CT7O5ngTp0TP9mg/HJP_jrm7A


Close #1268, #1267

<-- Briefly describe the content of this pull request -->

For Author:

  • Targeted PR against correct branch
  • included the correct type prefix in the PR title
  • Linked to Github issue with discussion and accepted design
  • Targets only one github issue
  • Wrote unit and integration tests
  • All CI checks have passed
  • Added relevant godoc comments

For Reviewer:

  • confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • confirmed all author checklist items have been addressed

After reviewer approval:

  • In case targets main branch, PR should be squashed and merged.
  • In case PR targets a release branch, PR should be rebased.

@srene srene self-assigned this Dec 4, 2024
@srene srene requested a review from a team as a code owner December 4, 2024 21:27
@srene srene marked this pull request as draft December 4, 2024 21:28
@srene srene changed the title fix(fork): fix stop condition + dont load from instruction fix(fork): stop condition + drs fork bug fix Dec 5, 2024
@srene srene changed the title fix(fork): stop condition + drs fork bug fix fix(fork): drs upgrade when multiple forks fix Dec 5, 2024
@srene srene linked an issue Dec 5, 2024 that may be closed by this pull request
@srene srene marked this pull request as ready for review December 5, 2024 11:44
@@ -229,28 +228,40 @@ func (m *Manager) submitForkBatch(height uint64) error {
// updateStateWhenFork updates dymint state in case fork is detected
func (m *Manager) updateStateWhenFork() error {
// in case fork is detected dymint state needs to be updated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

redundant comment as it doesn't add anything on top of the function godoc.
we should strive to have more reasoning in our comments, not just explaining what we do (but why we do it).
needs to be updated because..

@omritoptix omritoptix merged commit 7de4e89 into main Dec 8, 2024
4 checks passed
@omritoptix omritoptix deleted the srene/forkstopnodefix branch December 8, 2024 12:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants