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

feat(manager): allow starting node when sequencer is sentinel #1275

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

srene
Copy link
Contributor

@srene srene commented Dec 10, 2024

PR Standards

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

--

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


Close #1273,#1274

<-- 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 requested a review from a team as a code owner December 10, 2024 16:17
@srene srene linked an issue Dec 10, 2024 that may be closed by this pull request
@@ -232,7 +232,9 @@ func (m *Manager) Start(ctx context.Context) error {
if m.State.GetProposer() == nil {
m.logger.Info("No proposer on the rollapp, fallback to the hub proposer, if available")
err := m.UpdateProposerFromSL()
if err != nil {
if errors.Is(err, settlement.ErrProposerIsSentinel) {
m.freezeNode(fmt.Errorf("unable to start without new proposer at height %d", m.State.NextHeight()))
Copy link
Contributor

Choose a reason for hiding this comment

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

why u need it here? if u allow starting as full node anyway?

@@ -246,7 +248,9 @@ func (m *Manager) Start(ctx context.Context) error {
// for this case, 2 nodes will get `true` for `AmIProposer` so the l2 proposer can produce blocks and the hub proposer can submit his last batch.
// The hub proposer, after sending the last state update, will panic and restart as full node.
amIProposerOnSL, err := m.AmIProposerOnSL()
Copy link
Contributor

Choose a reason for hiding this comment

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

u can add

if errors.Is(err, settlement.ErrProposerIsSentinel) {
		return false, nil

into m.AmIProposerOnSL()

@srene srene marked this pull request as draft December 11, 2024 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants