Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Enable non consecutive ForkID jumps #3176

@arnaubennassar

Description

@arnaubennassar

Rationale

Right now the node prevents fork ID upgrades that are not consecutive in number:

                // Check to detect forkID inconsistencies
		if forkIDs[len(forkIDs)-1].ForkId+1 != newForkID.ForkId {
			log.Errorf("error checking forkID sequence. Last ForkID stored: %d. New ForkID received: %d", forkIDs[len(forkIDs)-1].ForkId, newForkID.ForkId)
			return fmt.Errorf("error checking forkID sequence. Last ForkID stored: %d. New ForkID received: %d", forkIDs[len(forkIDs)-1].ForkId, newForkID.ForkId)
		}

Why should this feature exist?

To allow CDKs that want to move from forkID X to fork ID Y where Y !== X+1

Implementation

Just remove the code mentioned above, or maybe change log level to warning and do not through error

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions