Skip to content

Commit 7db3e1c

Browse files
committed
Merge remote-tracking branch 'origin/unstable' into das
2 parents 77caa97 + e09fe5a commit 7db3e1c

File tree

10 files changed

+33
-152
lines changed

10 files changed

+33
-152
lines changed

Cargo.lock

Lines changed: 10 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ AARCH64_TAG = "aarch64-unknown-linux-gnu"
1212
BUILD_PATH_AARCH64 = "target/$(AARCH64_TAG)/release"
1313

1414
PINNED_NIGHTLY ?= nightly
15-
CLIPPY_PINNED_NIGHTLY=nightly-2022-05-19
1615

1716
# List of features to use when cross-compiling. Can be overridden via the environment.
1817
CROSS_FEATURES ?= gnosis,slasher-lmdb,slasher-mdbx,slasher-redb,jemalloc
@@ -222,13 +221,6 @@ lint:
222221
lint-fix:
223222
EXTRA_CLIPPY_OPTS="--fix --allow-staged --allow-dirty" $(MAKE) lint
224223

225-
nightly-lint:
226-
cp .github/custom/clippy.toml .
227-
cargo +$(CLIPPY_PINNED_NIGHTLY) clippy --workspace --tests --release -- \
228-
-A clippy::all \
229-
-D clippy::disallowed_from_async
230-
rm clippy.toml
231-
232224
# Runs the makefile in the `ef_tests` repo.
233225
#
234226
# May download and extract an archive of test vectors from the ethereum

beacon_node/execution_layer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ethereum_serde_utils = { workspace = true }
1717
serde_json = { workspace = true }
1818
serde = { workspace = true }
1919
warp = { workspace = true }
20-
jsonwebtoken = "8"
20+
jsonwebtoken = "9"
2121
bytes = { workspace = true }
2222
task_executor = { workspace = true }
2323
hex = { workspace = true }

book/src/api-vc-auth-header.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ HTTP header:
99
- Value: `Bearer <api-token>`
1010

1111
Where `<api-token>` is a string that can be obtained from the validator client
12-
host. Here is an example `Authorization` header:
12+
host. Here is an example of the `Authorization` header:
1313

1414
```text
15-
Authorization: Bearer api-token-0x03eace4c98e8f77477bb99efb74f9af10d800bd3318f92c33b719a4644254d4123
15+
Authorization: Bearer hGut6B8uEujufDXSmZsT0thnxvdvKFBvh
1616
```
1717

1818
## Obtaining the API token
@@ -24,7 +24,7 @@ text editor will suffice:
2424

2525
```bash
2626
cat api-token.txt
27-
api-token-0x03eace4c98e8f77477bb99efb74f9af10d800bd3318f92c33b719a4644254d4123
27+
hGut6B8uEujufDXSmZsT0thnxvdvKFBvh
2828
```
2929

3030
When starting the validator client it will output a log message containing the path
@@ -54,7 +54,7 @@ Response:
5454
Here is an example `curl` command using the API token in the `Authorization` header:
5555

5656
```bash
57-
curl localhost:5062/lighthouse/version -H "Authorization: Bearer api-token-0x03eace4c98e8f77477bb99efb74f9af10d800bd3318f92c33b719a4644254d4123"
57+
curl localhost:5062/lighthouse/version -H "Authorization: Bearer hGut6B8uEujufDXSmZsT0thnxvdvKFBvh"
5858
```
5959

6060
The server should respond with its version:

book/src/api-vc-endpoints.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ Example Response Body:
5353
}
5454
```
5555

56-
> Note: The command provided in this documentation links to the API token file. In this documentation, it is assumed that the API token file is located in `/var/lib/lighthouse/validators/API-token.txt`. If your database is saved in another directory, modify the `DATADIR` accordingly. If you are having permission issue with accessing the API token file, you can modify the header to become `-H "Authorization: Bearer $(sudo cat ${DATADIR}/validators/api-token.txt)"`.
56+
> Note: The command provided in this documentation links to the API token file. In this documentation, it is assumed that the API token file is located in `/var/lib/lighthouse/validators/api-token.txt`. If your database is saved in another directory, modify the `DATADIR` accordingly. If you are having permission issue with accessing the API token file, you can modify the header to become `-H "Authorization: Bearer $(sudo cat ${DATADIR}/validators/api-token.txt)"`.
5757
58-
> As an alternative, you can also provide the API token directly, for example, `-H "Authorization: Bearer api-token-0x02dc2a13115cc8c83baf170f597f22b1eb2930542941ab902df3daadebcb8f8176`. In this case, you obtain the token from the file `API token.txt` and the command becomes:
58+
> As an alternative, you can also provide the API token directly, for example, `-H "Authorization: Bearer hGut6B8uEujufDXSmZsT0thnxvdvKFBvh`. In this case, you obtain the token from the file `api-token.txt` and the command becomes:
5959
6060
```bash
61-
curl -X GET "http://localhost:5062/lighthouse/version" -H "Authorization: Bearer api-token-0x02dc2a13115cc8c83baf170f597f22b1eb2930542941ab902df3daadebcb8f8176" | jq
61+
curl -X GET "http://localhost:5062/lighthouse/version" -H "Authorization: Bearer hGut6B8uEujufDXSmZsT0thnxvdvKFBvh" | jq
6262
```
6363

6464
## `GET /lighthouse/health`

book/src/api-vc-sig-header.md

Lines changed: 0 additions & 108 deletions
This file was deleted.

book/src/validator-manager-move.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ location of the file varies, but it is located in the "validator directory" of y
116116
alongside validator keystores. For example: `~/.lighthouse/mainnet/validators/api-token.txt`. If you are unsure of the `api-token.txt` path, you can run `curl http://localhost:5062/lighthouse/auth` which will show the path.
117117

118118
Copy the contents of that file into a new file on the **destination host** at `~/src-token.txt`. The
119-
API token should be similar to `api-token-0x03eace4c98e8f77477bb99efb74f9af10d800bd3318f92c33b719a4644254d4123`.
119+
API token is a random string, e.g., `hGut6B8uEujufDXSmZsT0thnxvdvKFBvh`.
120120

121121
### 4. Create an SSH Tunnel
122122

consensus/state_processing/src/per_epoch_processing/single_pass.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,7 @@ impl PendingBalanceDepositsContext {
811811
.deposit_balance_to_consume()?
812812
.safe_add(state.get_activation_exit_churn_limit(spec)?)?;
813813
let current_epoch = state.current_epoch();
814+
let next_epoch = state.next_epoch()?;
814815
let mut processed_amount = 0;
815816
let mut next_deposit_index = 0;
816817
let mut validator_deposits_to_process = HashMap::new();
@@ -827,17 +828,20 @@ impl PendingBalanceDepositsContext {
827828
// does not happen until after this (but in the spec happens before). However it's not
828829
// hard to work out: we don't need to know exactly what value the `exit_epoch` will
829830
// take, just whether it is non-default. Nor do we need to know the value of
830-
// `withdrawable_epoch`, because `current_epoch <= withdrawable_epoch` will evaluate to
831+
// `withdrawable_epoch`, because `next_epoch <= withdrawable_epoch` will evaluate to
831832
// `true` both for the actual value & the default placeholder value (`FAR_FUTURE_EPOCH`).
832833
let validator = state.get_validator(deposit.index as usize)?;
833834
let already_exited = validator.exit_epoch < spec.far_future_epoch;
834835
// In the spec process_registry_updates is called before process_pending_balance_deposits
835836
// so we must account for process_registry_updates ejecting the validator for low balance
836-
// and setting the exit_epoch to < far_future_epoch
837+
// and setting the exit_epoch to < far_future_epoch. Note that in the spec the effective
838+
// balance update does not happen until *after* the registry update, so we don't need to
839+
// account for changes to the effective balance that would push it below the ejection
840+
// balance here.
837841
let will_be_exited = validator.is_active_at(current_epoch)
838842
&& validator.effective_balance <= spec.ejection_balance;
839843
if already_exited || will_be_exited {
840-
if state.current_epoch() <= validator.withdrawable_epoch {
844+
if next_epoch <= validator.withdrawable_epoch {
841845
deposits_to_postpone.push(deposit.clone());
842846
} else {
843847
// Deposited balance will never become active. Increase balance but do not
@@ -906,7 +910,7 @@ fn process_pending_consolidations<E: EthSpec>(
906910
spec: &ChainSpec,
907911
) -> Result<(), Error> {
908912
let mut next_pending_consolidation: usize = 0;
909-
let current_epoch = state.current_epoch();
913+
let next_epoch = state.next_epoch()?;
910914
let pending_consolidations = state.pending_consolidations()?.clone();
911915

912916
let mut affected_validators = BTreeSet::new();
@@ -919,7 +923,7 @@ fn process_pending_consolidations<E: EthSpec>(
919923
next_pending_consolidation.safe_add_assign(1)?;
920924
continue;
921925
}
922-
if source_validator.withdrawable_epoch > current_epoch {
926+
if source_validator.withdrawable_epoch > next_epoch {
923927
break;
924928
}
925929

testing/ef_tests/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TESTS_TAG := v1.5.0-alpha.3
1+
TESTS_TAG := v1.5.0-alpha.5
22
TESTS = general minimal mainnet
33
TARBALLS = $(patsubst %,%-$(TESTS_TAG).tar.gz,$(TESTS))
44

testing/ef_tests/check_all_files_accessed.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828
"tests/.*/.*/ssz_static/Eth1Block/",
2929
"tests/.*/.*/ssz_static/PowBlock/",
3030
# light_client
31-
# "tests/.*/.*/light_client",
3231
"tests/.*/.*/light_client/single_merkle_proof",
3332
"tests/.*/.*/light_client/sync",
33+
"tests/.*/electra/light_client/update_ranking",
3434
# LightClientStore
3535
"tests/.*/.*/ssz_static/LightClientStore",
3636
# LightClientSnapshot
@@ -40,7 +40,7 @@
4040
# Unused kzg methods
4141
"tests/.*/.*/kzg/verify_cell_kzg_proof",
4242
# One of the EF researchers likes to pack the tarballs on a Mac
43-
".*/.DS_Store.*",
43+
".*\\.DS_Store.*",
4444
# More Mac weirdness.
4545
"tests/mainnet/bellatrix/operations/deposit/pyspec_tests/deposit_with_previous_fork_version__valid_ineffective/._meta.yaml",
4646
"tests/mainnet/eip7594/networking/get_custody_columns/pyspec_tests/get_custody_columns__short_node_id/._meta.yaml",
@@ -56,7 +56,8 @@
5656
# TODO(electra) re-enable once https://github.com/sigp/lighthouse/issues/6002 is resolved
5757
"tests/.*/electra/ssz_static/LightClientUpdate",
5858
"tests/.*/electra/ssz_static/LightClientFinalityUpdate",
59-
"tests/.*/electra/ssz_static/LightClientBootstrap"
59+
"tests/.*/electra/ssz_static/LightClientBootstrap",
60+
"tests/.*/electra/merkle_proof",
6061
]
6162

6263

0 commit comments

Comments
 (0)