Jacek Sieka
9d155ebb35
avoid json-rpc server import ( #5649 )
2023-12-05 22:08:18 +01:00
tersec
c36d2aa103
fix XDeclaredButNotUsed warnings ( #5648 )
2023-12-05 11:45:47 +00:00
Eugene Kabanov
26bcb7057c
REST: Add implementation of postStateValidators and postStateValidatorBalances. ( #5632 )
...
* Add implementation POST versions of /eth/v1/beacon/states/{state_id}/validators and /eth/v1/beacon/states/{state_id}/validator_balances.
Add tests.
* Address review comments.
Fix toList() issue.
* Fix tests.
* Address review comments 2.
* Address review comments 3.
Fix unique check for validator identifiers.
* Address review comments.
* Fix constant value.
2023-11-29 12:05:03 +00:00
Etan Kissling
98e969084d
update Deneb for latest builder-specs flow ( #5598 )
...
The `BlobSidecar` construction has been moved to the relay and is no
longer done by the BN / VC in blinded flow. Builder bid contents have
been shrinked from full `BlindedBlobBundle` to `blob_kzg_commitments`.
- https://github.com/ethereum/builder-specs/pull/90
- https://github.com/ethereum/beacon-APIs/pull/369
2023-11-15 16:20:13 -08:00
Etan Kissling
d8a7f0df81
update Deneb for blob sidecar inclusion proofs ( #5565 )
...
`BlobSidecar` is no longer signed, instead use Merkle proof to link
blobs with block.
- https://github.com/ethereum/consensus-specs/pull/3531
Associated beacon-API / builder-specs still TBD; minimal changes done
to compile in similar style to previous spec, but not standardized yet.
- https://github.com/ethereum/beacon-APIs/pull/369
- https://github.com/ethereum/builder-specs/pull/90
2023-11-06 07:48:43 +01:00
Eugene Kabanov
1a5bcb479e
Fix `broadcast_validation` handling in `publishBlockV2` ( fixes #5531 ) ( #5547 )
...
* Address issue #5531 .
* Add more tests.
* Add to resttest ability to check values.
Fix tests.
2023-11-01 08:31:18 +01:00
tersec
b0d5001571
implement getBlobSidecars Beacon API endpoint ( #5530 )
2023-10-29 00:06:13 +00:00
tersec
c5028b56bf
change blinded block proposal failures to REST internal errors ( #5501 )
2023-10-12 23:54:24 +02:00
tersec
edc5c03230
consistently use SignedBlindedBeaconBlockContents; remove more Bellatrix Builder API remnants ( #5493 )
2023-10-11 11:48:35 +00:00
Eugene Kabanov
4fb95d000d
REST server fixes and improvements. ( #5422 )
...
* Move from Option[T] to Opt[T] usage.
* Add `finalized` flag.
* Fix compilation issue.
* Http415 error code for some REST API calls.
Introduce more comprehensive error reporting for block calls.
Deprecate decodeEthConsensusVersion() function.
* Bump http-utils.
* Fix copyright year.
* Fix serialization issue.
* Address review comments.
* Post rebase fixes.
2023-09-27 16:45:33 +02:00
Etan Kissling
e7bc41e005
`blck` --> `forkyBlck` when using `withBlck` / `withStateAndBlck` ( #5451 )
...
For symmetry with `forkyState` when using `withState`, and to avoid
problems with shadowing of `blck` when using `withBlck` in `template`,
also rename the injected `blck` to `forkyBlck`.
- https://github.com/nim-lang/Nim/issues/22698
2023-09-21 12:49:14 +02:00
henridf
9efd26c2e9
Add support for POST /eth/v2/beacon/blocks ( #5214 )
...
* Add support for POST /eth/v2/beacon/blocks
* More descriptive errors
* Address review feedback
* Return 500 (not 400) for a missing implementation case
2023-08-12 03:08:54 +00:00
Etan Kissling
f8ba2e3882
generalize `ShufflingRef` acceleration logic ( #5197 ) ( #5204 )
...
Split up the `ShufflingRef` acceleration logic into generically usable
parts and attester shuffling specific parts. The generic parts could be
used to accelerate other purposes, e.g., REST `/states/xxx/randao` API.
2023-07-31 18:12:15 +00:00
tersec
81c989660a
remove Bellatrix builder API support ( #5162 )
...
Co-authored-by: Etan Kissling <etan@status.im>
2023-07-20 04:37:54 +00:00
henridf
1234900065
Add blob handling to message router ( #5106 )
...
* Add blob handling to message router
* address review feedback
* Fix typos
2023-06-28 17:55:31 +00:00
henridf
0f8866d672
Add Deneb beacon API types ( #5060 )
...
* Add Deneb beacon API types
- Introduce the `ProduceBlockResponseV2` type for handling responses to `GET /eth/v2/validator/blocks/{slot}` (https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Validator/produceBlockV2 )
- Introduce the `RestPublishedSignedBlockContents` type for handling the request body to `POST /eth/v1/beacon/blocks` (https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/ValidatorRequiredApi/publishBlock )
And a few other small changes towards Deneb block production support.
* Address review feedback
* Post-rebase fixes
2023-06-19 08:56:52 +00:00
tersec
e8e67ec771
allow payload builder client to be function of validator/proposer ( #5015 )
...
* allow payload builder client to be function of validator/proposer
* fileExists has side effects on Windows and only Windows
* another not-always-func
2023-06-02 11:06:33 +00:00
tersec
7a7573d7d0
fix chronos done -> completed deprecation warnings ( #5016 )
2023-06-01 10:04:30 +02:00
tersec
d1941b670a
refactor payload builder REST client usage ( #4973 )
...
* refactor payload builder REST client usage
* change HTTP response code
2023-05-25 18:38:56 +03:00
tersec
d3929cbb45
update some beacon API spec URLs; fix some Name and DuplicateModuleImport hints ( #4929 )
2023-05-10 10:20:55 +00:00
tersec
eed34e740a
implement the getStateRandao Beacon API ( #4799 )
2023-04-11 18:27:48 +03:00
Etan Kissling
969c6f73ae
misc local `EIP4844` > `Deneb` bumps ( #4717 )
...
* misc local `EIP4844` > `Deneb` bumps
* fix
2023-03-11 00:28:19 +00:00
tersec
a47f0b054e
finish eip4844 to deneb module rename ( #4705 )
2023-03-09 01:34:17 +01:00
tersec
3b41e6a0e7
rename ConsensusFork.EIP4844 to ConsensusFork.Deneb ( #4692 )
2023-03-04 13:35:39 +00:00
henridf
3681177cf4
Remove ForkySignedBeaconBlockMaybeBlobs ( #4681 )
...
This commit removes ForkySignedBeaconBlockMaybeBlobs and all
references. I tried to pull that thread only as little as was needed
to get rid of it. Left a placeholder BlobSidecar array (in lieu of
Opt[BlobsSidecar]) in a few places; this will be used as we rebuild
the decoupled implementation.
2023-02-28 11:36:17 +00:00
tersec
8f269c92d7
rename eip48844ImplementationMissing to denebImplementationMissing ( #4654 )
2023-02-23 10:37:45 +00:00
tersec
dc0bbe3a57
rm blockForkAtEpoch and switch callers to consensusForkAtEpoch ( #4634 )
2023-02-16 21:16:54 +01:00
tersec
e342fdd97a
rename stateForkAtEpoch to consensusForkAtEpoch ( #4627 )
2023-02-16 11:32:12 +02:00
tersec
3977f1529a
fill in remaining capellaImplementationMissing holes for builder API ( #4606 )
2023-02-14 11:49:48 +01:00
tersec
ebb45e10da
initial implementation of capella MEV ( #4567 )
2023-02-06 19:07:30 +01:00
tersec
bca781b1b0
prioritize REST API-provided BLS to execution changes over gossip-received changes ( #4580 )
2023-02-03 16:28:28 +01:00
tersec
1c62a5eb24
capella VC support ( #4586 )
2023-02-03 16:12:11 +01:00
tersec
0fb726c420
`BeaconStateFork/BeaconBlockFork` -> `ConsensusFork` ( #4560 )
...
* `BeaconStateFork/BeaconBlockFork` -> `ConsensusFork`
* revert unrelated change
* revert unrelated changes
* update test summaries
2023-01-28 19:53:41 +00:00
Eugene Kabanov
08ed8ad43e
Adopt BN and VC header sizes and requirements, to avoid users confusion with default configuration options. ( #4556 )
...
Add comments.
2023-01-26 16:00:10 +01:00
tersec
d30544f790
disallow filling BLS to execution change pool pre-capella ( #4547 )
...
* disallow filling BLS to execution change pool pre-capella
* use better BLS change epoch
2023-01-24 22:25:51 +01:00
tersec
819e007689
exit/validatorchange pool includes BLS to execution messages; REST support for new pool ( #4519 )
...
* exit/validatorchange pool includes BLS to execution messages; REST
support for new pool
* catch failed individual futures
* increase BLS changes bound and keep BLS seen consistent with subpool
* deque capacities should be powers of 2
2023-01-19 22:00:40 +00:00
henridf
727920a571
Refactor block/blobs types ( #4491 )
...
* Refactor block/blobs types
Use type system to enforce invariant that a pre-4844 block cannot have
a sidecar.
* Update beacon_chain/nimbus_beacon_node.nim
Co-authored-by: tersec <tersec@users.noreply.github.com>
* review feedback
Co-authored-by: tersec <tersec@users.noreply.github.com>
2023-01-16 16:26:48 +00:00
Jacek Sieka
ba3db7aa5a
spec: Option -> Opt ( #4488 )
2023-01-11 12:29:21 +00:00
tersec
e7706768c3
add database beaconstate tests for capella and eip4844 ( #4429 )
2022-12-14 23:12:29 +00:00
tersec
2932d3b808
extent `BeaconStateFork` enum ( #4396 )
2022-12-07 16:47:23 +00:00
zah
d30cb8baf1
Support for obtaining deposit snapshots during trustedNodeSync ( #4303 )
...
Other changes:
* More optimal search for TTD block.
* Add timeouts to all REST requests during trusted node sync.
Fixes #4037
* Removed support for storing a deposit snapshot in the network
metadata.
2022-12-07 12:24:51 +02:00
tersec
3d829b8755
fix unguarded result access
2022-11-27 00:49:30 +00:00
tersec
a4d2637259
implement /eth/v1/beacon/blinded_blocks BN endpoint ( #4286 )
...
* implement /eth/v1/beacon/blinded_blocks BN endpoint
* avoid function names in non-debug logs
* callers log, so callee can just return err()
2022-11-08 18:08:43 +00:00
tersec
cee5a73a31
v1/beacon/blocks/{block_id}, v1/debug/beacon/states/{state_id}, and v1/validator/blocks/{slot} deprecated ( #4279 )
...
* v1/beacon/blocks/{block_id}, v1/debug/beacon/states/{state_id}, and v1/validator/blocks/{slot} deprecated
* Update beacon_chain/rpc/rest_constants.nim
Co-authored-by: Jacek Sieka <jacek@status.im>
* Update beacon_chain/rpc/rest_constants.nim
Co-authored-by: Jacek Sieka <jacek@status.im>
Co-authored-by: Jacek Sieka <jacek@status.im>
2022-11-02 10:56:55 +00:00
Etan Kissling
231eb8a590
use same style for sending block and state rsps ( #4209 )
...
For JSON responses, "eth-consensus-version" header is handled in
`eth2_rest_serialization` for states and `rest_beacon_api` for blocks.
Align them to also be handled in `eth2_rest_serialization` for blocks.
2022-10-04 01:05:52 +03:00
Eugene Kabanov
a845450283
REST API: add ssz encoding for publishBlock ( #4154 )
2022-09-30 00:00:53 +03:00
Jacek Sieka
af9ec577d0
nicer error message for failed backfill ( #4188 )
...
* nicer error message for failed backfill
Many checkpoint sources don't support block download
* RestGenericError -> RestErrorMessage
...and other assorted fixes to bring rest types closer to spec
* fix tests
2022-09-29 23:55:18 +03:00
Etan Kissling
77ea188c92
add `sszResponsePlain` for pre-encoded SSZ data ( #4171 )
...
For pre-encoded JSON REST responses we have `jsonResponsePlain`.
Adds a `sszResponsePlain` function to serve similar purpose for SSZ.
This avoids caller having to explicitly specify Http200 and media type.
2022-09-23 15:51:04 +00:00
tersec
5b0b48f6e9
implement /eth/v1/validator/register_validator ( #4115 )
2022-09-13 14:52:26 +03:00
zah
fca20e08d6
Keymanager API for the validator client ( #3976 )
...
* Keymanager API for the validator client
* Properly treat the 'description' field as optional when loading Keystores
* Spec-compliant serialization of the slashing data in Keymanager's DeleteKeys response ()
Fixes #3940
Fixes #3964
Closes #3884 by adding test
2022-08-19 13:30:07 +03:00