rm more Capella builder API remote signer support (#6012)

This commit is contained in:
tersec 2024-03-01 22:29:47 +00:00 committed by GitHub
parent 45c283c256
commit e12f5e0bba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 16 deletions

View File

@ -703,7 +703,8 @@ template get_flag_and_inactivity_delta(
penalty_denominator: uint64, penalty_denominator: uint64,
epoch_participation: ptr EpochParticipationFlags, epoch_participation: ptr EpochParticipationFlags,
participating_increments: array[3, Gwei], info: var altair.EpochInfo, participating_increments: array[3, Gwei], info: var altair.EpochInfo,
vidx: ValidatorIndex): auto = vidx: ValidatorIndex):
(ValidatorIndex, Gwei, Gwei, Gwei, Gwei, Gwei, Gwei) =
let let
base_reward = get_base_reward_increment(state, vidx, base_reward_per_increment) base_reward = get_base_reward_increment(state, vidx, base_reward_per_increment)
pflags = pflags =

View File

@ -568,10 +568,10 @@ proc getBlockSignature*(v: AttachedValidator, fork: Fork,
withForkyMaybeBlindedBlck(blck): withForkyMaybeBlindedBlck(blck):
# TODO why isn't this a case statement # TODO why isn't this a case statement
when consensusFork < ConsensusFork.Bellatrix: when consensusFork < ConsensusFork.Bellatrix:
return SignatureResult.err("Invalid beacon block fork version") return SignatureResult.err("Invalid beacon block fork")
elif consensusFork == ConsensusFork.Bellatrix: elif consensusFork == ConsensusFork.Bellatrix:
when isBlinded: when isBlinded:
return SignatureResult.err("Invalid beacon block fork version") return SignatureResult.err("Invalid blinded beacon block fork")
else: else:
case v.data.remoteType case v.data.remoteType
of RemoteSignerType.Web3Signer: of RemoteSignerType.Web3Signer:
@ -587,18 +587,7 @@ proc getBlockSignature*(v: AttachedValidator, fork: Fork,
proofs) proofs)
elif consensusFork == ConsensusFork.Capella: elif consensusFork == ConsensusFork.Capella:
when isBlinded: when isBlinded:
case v.data.remoteType return SignatureResult.err("Invalid blinded beacon block fork")
of RemoteSignerType.Web3Signer:
Web3SignerRequest.init(fork, genesis_validators_root,
Web3SignerForkedBeaconBlock(kind: ConsensusFork.Capella,
data: forkyMaybeBlindedBlck.toBeaconBlockHeader))
of RemoteSignerType.VerifyingWeb3Signer:
let proofs =
blockPropertiesProofs(forkyMaybeBlindedBlck.body,
capellaIndex)
Web3SignerRequest.init(fork, genesis_validators_root,
Web3SignerForkedBeaconBlock(kind: ConsensusFork.Capella,
data: forkyMaybeBlindedBlck.toBeaconBlockHeader), proofs)
else: else:
case v.data.remoteType case v.data.remoteType
of RemoteSignerType.Web3Signer: of RemoteSignerType.Web3Signer:
@ -644,7 +633,7 @@ proc getBlockSignature*(v: AttachedValidator, fork: Fork,
else: else:
case blck.kind case blck.kind
of ConsensusFork.Phase0, ConsensusFork.Altair: of ConsensusFork.Phase0, ConsensusFork.Altair:
return SignatureResult.err("Invalid beacon block fork version") return SignatureResult.err("Invalid beacon block fork")
of ConsensusFork.Bellatrix: of ConsensusFork.Bellatrix:
case v.data.remoteType case v.data.remoteType
of RemoteSignerType.Web3Signer: of RemoteSignerType.Web3Signer: