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

[sovereign] Fix revert RestoreBlockIntoPools #6753

Merged
merged 25 commits into from
Feb 14, 2025

Conversation

mariusmihaic
Copy link
Contributor

@mariusmihaic mariusmihaic commented Jan 29, 2025

Reasoning behind the pull request

  • Fixes so that sovereign chain can have forks and be able to revert blocks
  • #forks on internal testnet

Proposed changes

  • sortExtendedShardHeadersForCurrentBlockByNonce sorts the actual extended headers from the current block proposed by leader
    Fixes for RestoreBlockIntoPools:
  1. Implement restoreExtendedHeaderIntoPool
  2. Only call RemoveLastCrossNotarizedHeaders separately if the current header contains a notarized extended header

Testing procedure

  • #forks #mainnet-connection #sov-round-time=1sec
  • #forks #mainnet-connection #sov-round-time=6sec
  • #forks #mainnet-connection #sov-round-time=20sec

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

…d on extended headers
@mariusmihaic mariusmihaic self-assigned this Jan 29, 2025
mariusmihaic and others added 22 commits January 29, 2025 17:50
…oolsShouldWork
# Conflicts:
#	process/block/sovereignChainBlock.go
@mariusmihaic mariusmihaic marked this pull request as ready for review February 10, 2025 15:19
@sasurobert sasurobert self-requested a review February 11, 2025 14:02
scbp.blockTracker.RemoveLastNotarizedHeaders()

// TODO: MX-16507: check how/if to restore incoming scrs/cross chain txs once we have a testnet setup for it
// 1. For incoming scrs We should probably have something similar to (sp *shardProcessor) rollBackProcessedMiniBlocksInfo
Copy link
Contributor

Choose a reason for hiding this comment

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

actually we shouldn't really have any rollbacks anymore :D

Like with one shot finality. And we can aim for that as Andromeda is going to be released.

Merging Andromeda into this code, and what is once voted, it is a finished block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's super awesome, actually, would simplify things a lot !

if headerInfo.usedInBlock {
hdrsForCurrentBlock = append(hdrsForCurrentBlock, headerInfo.hdr)

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might do it on another PR

Copy link

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 8ef11d09182998140a4a5fc25b35d7f5d81e32da
  • Current Branch: MX-16488-sov-fix-revert-blocks
  • mx-chain-go Target Branch: feat/chain-go-sdk
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main

🚀 Environment Variables:

  • TIMESTAMP: 14022025-103916
  • PYTEST_EXIT_CODE: 0
    🎉 MultiversX CI/CD Workflow Complete!

Copy link

📊 MultiversX Automated Test Report: View Report

🔄 Build Details:

  • mx-chain-go Commit Hash: 1d3421347c9610eeaff4bc3fe64135cc7dbb54a1
  • Current Branch: MX-16488-sov-fix-revert-blocks
  • mx-chain-go Target Branch: feat/chain-go-sdk
  • mx-chain-simulator-go Target Branch: main
  • mx-chain-testing-suite Target Branch: main

🚀 Environment Variables:

  • TIMESTAMP: 14022025-112109
  • PYTEST_EXIT_CODE: 0
    🎉 MultiversX CI/CD Workflow Complete!

@mariusmihaic mariusmihaic merged commit cd2cf25 into feat/chain-go-sdk Feb 14, 2025
7 checks passed
@mariusmihaic mariusmihaic deleted the MX-16488-sov-fix-revert-blocks branch February 14, 2025 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants