Emilia Hane
09370e70d9
Fix rebase conflicts
2023-02-10 09:41:19 +01:00
realbigsean
a42d07592c
fix compilation issues after merge
2023-02-07 12:33:29 -05:00
realbigsean
26a296246d
Merge branch 'capella' of https://github.com/sigp/lighthouse into eip4844
...
# Conflicts:
# beacon_node/beacon_chain/src/beacon_chain.rs
# beacon_node/beacon_chain/src/block_verification.rs
# beacon_node/beacon_chain/src/test_utils.rs
# beacon_node/execution_layer/src/engine_api.rs
# beacon_node/execution_layer/src/engine_api/http.rs
# beacon_node/execution_layer/src/lib.rs
# beacon_node/execution_layer/src/test_utils/handle_rpc.rs
# beacon_node/http_api/src/lib.rs
# beacon_node/http_api/tests/fork_tests.rs
# beacon_node/network/src/beacon_processor/mod.rs
# beacon_node/network/src/beacon_processor/work_reprocessing_queue.rs
# beacon_node/network/src/beacon_processor/worker/sync_methods.rs
# beacon_node/operation_pool/src/bls_to_execution_changes.rs
# beacon_node/operation_pool/src/lib.rs
# beacon_node/operation_pool/src/persistence.rs
# consensus/serde_utils/src/u256_hex_be_opt.rs
# testing/antithesis/Dockerfile.libvoidstar
2023-02-07 12:12:56 -05:00
naviechan
9547ac069c
Implement block_rewards API (per-validator reward) ( #3907 )
...
## Issue Addressed
[#3661 ](https://github.com/sigp/lighthouse/issues/3661 )
## Proposed Changes
`/eth/v1/beacon/rewards/blocks/{block_id}`
```
{
"execution_optimistic": false,
"finalized": false,
"data": {
"proposer_index": "123",
"total": "123",
"attestations": "123",
"sync_aggregate": "123",
"proposer_slashings": "123",
"attester_slashings": "123"
}
}
```
The issue contains the implementation of three per-validator reward APIs:
* `sync_committee_rewards`
* [`attestation_rewards`](https://github.com/sigp/lighthouse/pull/3822 )
* `block_rewards`
This PR only implements the `block_rewards`.
The endpoints can be viewed in the Ethereum Beacon nodes API browser: [https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards ](https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards )
## Additional Info
The implementation of [consensus client reward APIs](https://github.com/eth-protocol-fellows/cohort-three/blob/master/projects/project-ideas.md#consensus-client-reward-apis ) is part of the [EPF](https://github.com/eth-protocol-fellows/cohort-three ).
Co-authored-by: kevinbogner <kevbogner@gmail.com >
Co-authored-by: navie <naviechan@gmail.com >
2023-02-07 08:33:23 +00:00
Paul Hauner
e062a7cf76
Broadcast address changes at Capella ( #3919 )
...
* Add first efforts at broadcast
* Tidy
* Move broadcast code to client
* Progress with broadcast impl
* Rename to address change
* Fix compile errors
* Use `while` loop
* Tidy
* Flip broadcast condition
* Switch to forgetting individual indices
* Always broadcast when the node starts
* Refactor into two functions
* Add testing
* Add another test
* Tidy, add more testing
* Tidy
* Add test, rename enum
* Rename enum again
* Tidy
* Break loop early
* Add V15 schema migration
* Bump schema version
* Progress with migration
* Update beacon_node/client/src/address_change_broadcast.rs
Co-authored-by: Michael Sproul <micsproul@gmail.com >
* Fix typo in function name
---------
Co-authored-by: Michael Sproul <micsproul@gmail.com >
2023-02-07 17:13:49 +11:00
kevinbogner
4d07e40501
Implement attestation_rewards API (per-validator reward) ( #3822 )
...
## Issue Addressed
#3661
## Proposed Changes
`/eth/v1/beacon/rewards/attestations/{epoch}`
```json
{
"execution_optimistic": false,
"finalized": false,
"data": [
{
"ideal_rewards": [
{
"effective_balance": "1000000000",
"head": "2500",
"target": "5000",
"source": "5000"
}
],
"total_rewards": [
{
"validator_index": "0",
"head": "2000",
"target": "2000",
"source": "4000",
"inclusion_delay": "2000"
}
]
}
]
}
```
The issue contains the implementation of three per-validator reward APIs:
- [`sync_committee_rewards`](https://github.com/sigp/lighthouse/pull/3790 )
- `attestation_rewards`
- `block_rewards`.
This PR *only* implements the `attestation_rewards`.
The endpoints can be viewed in the Ethereum Beacon nodes API browser: https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards
## Additional Info
The implementation of [consensus client reward APIs](https://github.com/eth-protocol-fellows/cohort-three/blob/master/projects/project-ideas.md#consensus-client-reward-apis ) is part of the [EPF](https://github.com/eth-protocol-fellows/cohort-three ).
---
- [x] `get_state`
- [x] Calculate *ideal rewards* with some logic from `get_flag_index_deltas`
- [x] Calculate *actual rewards* with some logic from `get_flag_index_deltas`
- [x] Code cleanup
- [x] Testing
2023-02-07 00:00:19 +00:00
naviechan
9b5c2eefd5
Implement sync_committee_rewards API (per-validator reward) ( #3903 )
...
[#3661 ](https://github.com/sigp/lighthouse/issues/3661 )
`/eth/v1/beacon/rewards/sync_committee/{block_id}`
```
{
"execution_optimistic": false,
"finalized": false,
"data": [
{
"validator_index": "0",
"reward": "2000"
}
]
}
```
The issue contains the implementation of three per-validator reward APIs:
* `sync_committee_rewards`
* [`attestation_rewards`](https://github.com/sigp/lighthouse/pull/3822 )
* `block_rewards`
This PR only implements the `sync_committe_rewards `.
The endpoints can be viewed in the Ethereum Beacon nodes API browser: [https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards ](https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards )
The implementation of [consensus client reward APIs](https://github.com/eth-protocol-fellows/cohort-three/blob/master/projects/project-ideas.md#consensus-client-reward-apis ) is part of the [EPF](https://github.com/eth-protocol-fellows/cohort-three ).
Co-authored-by: navie <naviechan@gmail.com >
Co-authored-by: kevinbogner <kevbogner@gmail.com >
2023-01-25 14:22:15 +01:00
Michael Sproul
a4cfe50ade
Import BLS to execution changes before Capella ( #3892 )
...
* Import BLS to execution changes before Capella
* Test for BLS to execution change HTTP API
* Pack BLS to execution changes in LIFO order
* Remove unused var
* Clippy
2023-01-25 14:21:54 +01:00
Santiago Medina
bd7bd005ee
Return HTTP 404 rather than 405 ( #3836 )
...
Issue #3112
Add `Filter::recover` to the GET chain to handle rejections specifically as 404 NOT FOUND
Making a request to `http://localhost:5052/not_real ` now returns the following:
```
{
"code": 404,
"message": "NOT_FOUND",
"stacktraces": []
}
```
Co-authored-by: Paul Hauner <paul@paulhauner.com >
2023-01-25 14:21:07 +01:00
Michael Sproul
c76a1971cc
Merge remote-tracking branch 'origin/unstable' into capella
2023-01-25 14:20:16 +11:00
naviechan
2802bc9a9c
Implement sync_committee_rewards API (per-validator reward) ( #3903 )
...
## Issue Addressed
[#3661 ](https://github.com/sigp/lighthouse/issues/3661 )
## Proposed Changes
`/eth/v1/beacon/rewards/sync_committee/{block_id}`
```
{
"execution_optimistic": false,
"finalized": false,
"data": [
{
"validator_index": "0",
"reward": "2000"
}
]
}
```
The issue contains the implementation of three per-validator reward APIs:
* `sync_committee_rewards`
* [`attestation_rewards`](https://github.com/sigp/lighthouse/pull/3822 )
* `block_rewards`
This PR only implements the `sync_committe_rewards `.
The endpoints can be viewed in the Ethereum Beacon nodes API browser: [https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards ](https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/Rewards )
## Additional Info
The implementation of [consensus client reward APIs](https://github.com/eth-protocol-fellows/cohort-three/blob/master/projects/project-ideas.md#consensus-client-reward-apis ) is part of the [EPF](https://github.com/eth-protocol-fellows/cohort-three ).
Co-authored-by: navie <naviechan@gmail.com >
Co-authored-by: kevinbogner <kevbogner@gmail.com >
2023-01-24 02:06:42 +00:00
realbigsean
75320ff8bc
cleanup
2023-01-22 05:54:25 +01:00
realbigsean
a83fd1afb4
remove unused imports
2023-01-21 04:52:36 -05:00
realbigsean
cbd09dc281
finish refactor
2023-01-21 04:48:25 -05:00
Michael Sproul
d8abf2fc41
Import BLS to execution changes before Capella ( #3892 )
...
* Import BLS to execution changes before Capella
* Test for BLS to execution change HTTP API
* Pack BLS to execution changes in LIFO order
* Remove unused var
* Clippy
2023-01-21 10:39:59 +11:00
Michael Sproul
bb0e99c097
Merge remote-tracking branch 'origin/unstable' into capella
2023-01-21 10:37:26 +11:00
realbigsean
3cb8fb7973
block wrapper refactor initial commit
2023-01-20 11:50:16 -05:00
Santiago Medina
912ea2a5ca
Return HTTP 404 rather than 405 ( #3836 )
...
## Issue Addressed
Issue #3112
## Proposed Changes
Add `Filter::recover` to the GET chain to handle rejections specifically as 404 NOT FOUND
## Additional Info
Making a request to `http://localhost:5052/not_real ` now returns the following:
```
{
"code": 404,
"message": "NOT_FOUND",
"stacktraces": []
}
```
Co-authored-by: Paul Hauner <paul@paulhauner.com >
2023-01-16 03:42:09 +00:00
realbigsean
438126f19a
merge upstream, fix compile errors
2023-01-11 13:52:58 -05:00
ethDreamer
cb94f639b0
Isolate withdrawals-processing Feature ( #3854 )
2023-01-09 11:05:28 +11:00
realbigsean
8a77b05c19
Merge pull request #3830 from jimmygchen/blobs-beacon-api
...
Add Beacon API endpoint (/lighthouse) to download blobs by block ID
2023-01-04 09:04:32 -05:00
Jimmy Chen
7c2a0aeb58
Merge branch 'blobs-beacon-api' of github.com:jimmygchen/lighthouse into blobs-beacon-api
2023-01-04 01:58:08 +11:00
Jimmy Chen
355cab8704
Simplify blob_sidecar query and remove override for Head and Slot
2023-01-04 01:57:15 +11:00
Jimmy Chen
11736b68d3
Return beacon_chain_error if blob query from BeaconStore returns an error
2023-01-04 01:23:31 +11:00
realbigsean
d8f7277beb
cleanup
2022-12-30 11:00:14 -05:00
Mark Mackey
c188cde034
merge upstream/unstable
2022-12-28 14:43:25 -06:00
realbigsean
8a70d80a2f
Revert "Revert "renames, remove , wrap BlockWrapper enum to make descontruction private""
...
This reverts commit 1931a442dc .
2022-12-28 10:31:18 -05:00
realbigsean
1931a442dc
Revert "renames, remove , wrap BlockWrapper enum to make descontruction private"
...
This reverts commit 5b3b34a9d7 .
2022-12-28 10:30:36 -05:00
realbigsean
5b3b34a9d7
renames, remove , wrap BlockWrapper enum to make descontruction private
2022-12-28 10:28:45 -05:00
Jimmy Chen
1b64cbadba
Merge remote-tracking branch 'origin/eip4844' into blobs-beacon-api
2022-12-24 00:41:45 +00:00
Diva M
6bf439befd
Merge branch 'eip4844' into empty-blobs
2022-12-23 17:38:59 -05:00
Divma
240854750c
cleanup: remove unused imports, unusued fields ( #3834 )
2022-12-23 17:16:10 -05:00
realbigsean
5e11edc612
fix blob validation for empty blobs
2022-12-23 12:47:38 -05:00
Jimmy Chen
f6d5e8fea3
Rename variable only
2022-12-23 16:14:53 +11:00
Jimmy Chen
3b9041047a
Fix typoe and add blobs endpoint to eth2 lib.
2022-12-23 15:28:08 +11:00
Jimmy Chen
bf7f709b51
Add missing route
2022-12-23 14:52:03 +11:00
Jimmy Chen
70d6e6705e
Add Beacon API endpoint to download blobs by block ID
2022-12-23 12:42:00 +11:00
Jimmy Chen
14aa87aff3
Fix code comment
2022-12-22 00:19:38 +11:00
realbigsean
3ab0f46077
Update beacon_node/http_api/src/publish_blocks.rs
...
Co-authored-by: Divma <26765164+divagant-martian@users.noreply.github.com >
2022-12-19 12:27:31 -05:00
realbigsean
5de4f5b8d0
handle parent blob request edge cases correctly. fix data availability boundary check
2022-12-19 11:39:09 -05:00
Divma
ffbf70e2d9
Clippy lints for rust 1.66 ( #3810 )
...
## Issue Addressed
Fixes the new clippy lints for rust 1.66
## Proposed Changes
Most of the changes come from:
- [unnecessary_cast](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast )
- [iter_kv_map](https://rust-lang.github.io/rust-clippy/master/index.html#iter_kv_map )
- [needless_borrow](https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow )
## Additional Info
na
2022-12-16 04:04:00 +00:00
realbigsean
d893706e0e
merge with capella
2022-12-15 09:33:18 -05:00
Michael Sproul
f3e8ca852e
Fix Clippy
2022-12-14 14:04:13 +11:00
Michael Sproul
991e4094f8
Merge remote-tracking branch 'origin/unstable' into capella-update
2022-12-14 13:00:41 +11:00
Michael Sproul
63d3dd27fc
Batch API for address changes ( #3798 )
2022-12-14 12:01:33 +11:00
ethDreamer
b1c33361ea
Fixed Clippy Complaints & Some Failing Tests ( #3791 )
...
* Fixed Clippy Complaints & Some Failing Tests
* Update Dockerfile to Rust-1.65
* EF test file renamed
* Touch up comments based on feedback
2022-12-13 10:50:24 -06:00
Paul Hauner
c973bfc90c
Reduce log severity for late and unrevealed blocks ( #3775 )
...
## Issue Addressed
NA
## Proposed Changes
In #3725 I introduced a `CRIT` log for unrevealed payloads, against @michaelsproul's [advice](https://github.com/sigp/lighthouse/pull/3725#discussion_r1034142113 ). After being woken up in the middle of the night by a block that was not revealed to the BN but *was* revealed to the network, I have capitulated. This PR implements @michaelsproul's suggestion and reduces the severity to `ERRO`.
Additionally, I have dropped a `CRIT` to an `ERRO` for when a block is published late. The block in question was indeed published late on the network, however now that we have builders that can slow down block production I don't think the error is "actionable" enough to warrant a `CRIT` for the user.
## Additional Info
NA
2022-12-10 00:45:18 +00:00
Mac L
8cb9b5e126
Expose certain validator_monitor metrics to the HTTP API ( #3760 )
...
## Issue Addressed
#3724
## Proposed Changes
Exposes certain `validator_monitor` as an endpoint on the HTTP API. Will only return metrics for validators which are actively being monitored.
### Usage
```bash
curl -X GET "http://localhost:5052/lighthouse/ui/validator_metrics " -H "accept: application/json" | jq
```
```json
{
"data": {
"validators": {
"12345": {
"attestation_hits": 10,
"attestation_misses": 0,
"attestation_hit_percentage": 100,
"attestation_head_hits": 10,
"attestation_head_misses": 0,
"attestation_head_hit_percentage": 100,
"attestation_target_hits": 5,
"attestation_target_misses": 5,
"attestation_target_hit_percentage": 50
}
}
}
}
```
## Additional Info
Based on #3756 which should be merged first.
2022-12-09 06:39:19 +00:00
realbigsean
d59a1c63fb
small cleanup
2022-12-08 09:18:56 -05:00
realbigsean
6c8b1b323b
merge upstream
2022-12-07 12:27:21 -05:00