disallow filling BLS to execution change pool pre-capella (#4547)

* disallow filling BLS to execution change pool pre-capella

* use better BLS change epoch
This commit is contained in:
tersec 2023-01-24 22:25:51 +01:00 committed by GitHub
parent efbd4e395a
commit d30544f790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1125,6 +1125,10 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
# https://github.com/ethereum/beacon-APIs/blob/86850001845df9163da5ae9605dbf15cd318d5d0/apis/beacon/pool/bls_to_execution_changes.yaml
router.api(MethodPost, "/eth/v1/beacon/pool/bls_to_execution_changes") do (
contentBody: Option[ContentBody]) -> RestApiResponse:
if node.currentSlot().epoch() < node.dag.cfg.CAPELLA_FORK_EPOCH:
return RestApiResponse.jsonError(Http400,
InvalidBlsToExecutionChangeObjectError,
"Attempt to add to BLS to execution change pool pre-Capella")
let bls_to_execution_changes =
block:
if contentBody.isNone():