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

[Access] Allow access nodes to sync blocks from before they joined the network #6421

Open
Tracked by #6455
peterargue opened this issue Aug 29, 2024 · 0 comments
Open
Tracked by #6455
Labels

Comments

@peterargue
Copy link
Contributor

peterargue commented Aug 29, 2024

Problem Description

Currently, nodes cannot sync blocks from before they joined the network. As a result, they cannot index execution data or serve requests from earlier blocks. Many AN operators would prefer to have the option to sync and provide access to data for those earlier blocks

Proposed Solution

Add a flag to ANs that allows them to bypass the checks and sync data from before they were staked. This may have some risks so before doing any work, we should assess the changes needed, their impact, and determine if there are any BFT issues that need to be considered.

Challenges

  1. Nodes cannot start if they are not staked in their root block
    The immediate challenge is that the node will fail to start if it is not staked in the root block. Specifically this check here:

    flow-go/cmd/scaffold.go

    Lines 1480 to 1487 in 72ac1d1

    // Verify that my ID (as given in the configuration) is known to the network
    // (i.e. protocol state). There are two cases that will cause the following error:
    // 1) used the wrong node id, which is not part of the identity list of the finalized state
    // 2) the node id is a new one for a new spork, but the bootstrap data has not been updated.
    self, err := fnb.State.Final().Identity(myID)
    if err != nil {
    return fmt.Errorf("node identity not found in the identity list of the finalized state (id: %v): %w", myID, err)
    }

  2. Nodes cannot communicate if they are not staked in their current finalized block.
    The next challenge is that the node will not send any messages if it is not a staked member of the network at its current finalized block. This means that it currently cannot start syncing from a root block before it became part of the network since all outbound sync messages will be dropped.
    Additionally, any Consensus node that joined after the root block will also be ignored and penalized since they would also not appear to be staked from the AN's perspective.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant