Skip to content

Fork name decoding should be case insensitive #2583

@michaelsproul

Description

@michaelsproul

Description

I just checked in on my little Teku-Lighthouse Pyrmont validator for the first time in a while and found that it had failed to produce a few blocks with:

Sep 04 14:31:31.686 CRIT Error whilst producing block            message: All endpoints failed https://eth2-beacon-pyrmont.infura.io/ => RequestFailed("Error from beacon node when producing block: Reqwest(reqwest::Error { kind: Decode, source: Error(\"Invalid fork name: ALTAIR\", line: 1, column: 19) })"), service: block

Specifically Teku BNs uppercase the fork name:

Invalid fork name: ALTAIR

This should be a one-line fix, a simple fork_name.lower() here:

Ok(match fork_name {
"phase0" | "base" => ForkName::Base,
"altair" => ForkName::Altair,
_ => return Err(()),
})

Plus a test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomerslow-hanging-fruitEasy to resolve, get it before someone else does!v2.0.0Altair on mainnet release (v2.0.0)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions