Commit Graph

5846 Commits

Author SHA1 Message Date
tersec 9e14d904ac
https://github.com/ethereum/consensus-specs/pull/3359 (#5047) 2023-06-10 05:39:10 +00:00
Etan Kissling db48160ab3
bump `nim-testutils` to `53a9fb09923004455b7e6d750c8144f3c7ede201` (#5010)
- allow `programMain` to throw
2023-06-10 05:11:10 +00:00
Etan Kissling 40a6f1dd82
bump `nim-chronicles` to `74dc6e2e58bc0f63d22febed66726a815b8363db` (#5052)
- Generate lock file
- v0.10.3
- fix stylecheck to be compatible with Nim 1.2 and 1.6
- update to supported macOS GitHub CI image
- switch GitHub Actions CI images from deprecated Ubuntu 18.04 to 20.04
- Fix nim 2.0 bare except warnings
- fix nim 1.6 bare except warnings
- reduce compiler warnings
- Fix bare expect warning
- Remove appveyor and travis scripts
- upgrade github actions to v3
- remove nimble.lock, which is outdated and block Nim CI
2023-06-10 02:08:32 +00:00
tersec 6a9ed6ddd5
use v1.4.0-alpha.2 consensus spec test vectors (#5051) 2023-06-10 01:45:53 +00:00
tersec 54cb06ea06
fix chronos deprecation warning (#5048) 2023-06-09 23:43:28 +00:00
Miran 73fc1d5a2b
Update "Getting started" part of the book (#4938)
* refactor index.md

* move philosophy.md into index.md

* clean up the 'getting started' topic

move how-to's to the how-to section

* cleaner titles

* move prerequisites to the install.md page

* hardware.md: small refactor

* improve quick-start.md

* refactor eth1.md

* refactor validating guide

* reverse the order of BN and LC in the table

* pi-guide.md: minor edit

* Apply suggestions from code review

Co-authored-by: tersec <tersec@users.noreply.github.com>

* make link texts more concrete

* remove comparison to other clients

* add some more explanations to `build.md`

* change 'days' to 'hours'

---------

Co-authored-by: tersec <tersec@users.noreply.github.com>
2023-06-09 23:06:01 +00:00
Etan Kissling 6548651e42
bump `nim-confutils` to `6c3566850d5ec241d8cb687ae8461c972040311a` (#5046)
- remove support for Nim v1.2 and v1.4
- use --mm: instead of --gc: and remove stddefects import
- annotate `parseCmdArg` with `{.raises.}`
- ignore exceptions while writing to stdout/stderr
- handle `terminalWidth` exception
- catch exceptions in `appInvocation`
2023-06-09 21:45:52 +00:00
Etan Kissling 16adda2cd5
bump `nim-ssz-serialization` to `4c3e600da2051f81fe3074ae344f75f96a66de9d` (#5045)
- add support for generic union
- switch CI to the supported versions of ubuntu and macos
- install openssl on macos for Nim devel
- update github actions to v3
- improve union validation
- enable ssSize of union
- implement SSZ Optionals (EIP-6475)
- implement sszSize of Optionals
- use Nim 2.0 in CI
- test both refc and ORC in post-1.6 Nim versions
- stop testing Nim pre-1.6 in CI
- update for latest `Optional` spec
- avoid ptr_arith
- remove redundant when's because Nim 1.6+ is always true
- rm unused `SszMaxSizeExceeded`
- remove Defect raises
2023-06-09 21:35:18 +00:00
Etan Kissling a0d63c50ee
do not use untrusted `genesis.ssz` with `--trusted-block-root` (#5025)
When using trusted node sync with `--trusted-block-root`, the remote
server is only trusted for data availability, not for correctness.
As a downloaded genesis state cannot be validated for correctness,
require it to be passed via the network metadata `genesis.ssz` file
for `--trusted-block-root` mode. Network metadata is considered trusted
as it is provided by the user and not by the remote server.
Further adds a check for consistent `genesis_time` when using `StateId`
based trusted node sync. This is just a sanity check to avoid spreading
blatantly incorrect data, similar to existing `genesis_validators_root`
checks.
2023-06-09 22:11:14 +02:00
Etan Kissling 5a2fd46d79
bump `nim-serialization` to `845bed4478c8f0ac893494083798348e9e7ffb58` (#5043)
- fix nim devel error: 'result' requires explicit initialization
- Use Nim 2.0 in CI
- test both refc and ORC in post-1.6 Nim versions
- fix makeFieldReadersTable crash when orc enabled.
- remove appveyor and travis scripts
2023-06-09 11:55:41 +00:00
henridf eda631cd7a
Blob accounting fixes/tweaks (#5044)
- Replace asset by warning
- change inequality to lt
2023-06-09 10:52:03 +00:00
Jacek Sieka 7028cc45f5
bump stew (#5040)
`results` updates, brings better error messages and convenient helpers
2023-06-08 18:14:49 +00:00
Tanguy 46a12639b8
Read messages before applying quota to avoid mplex backpressure issues (#4697)
* Apply global quota after reading messages

* Also wait quota for failed requests

* Better integration

* comments
2023-06-08 14:20:41 +00:00
Jacek Sieka 8db87a0cfc
bump chronos (#5039)
* separate futures import / Defect cleanups
* unittest2 fix to allow `stackTrace` as a symbol name generally
2023-06-08 13:42:19 +00:00
Eugene Kabanov effe8b7f90
VC: Remote BN received block monitoring. (#4856)
* Initial commit with both methods enabled: `poll` and `event`.

* Address review comments.

* Address review comments.
Fix copyright years.

* After bump fixes.
2023-06-08 10:44:32 +02:00
tersec e8c6af0636
add getNextWithdrawals Beacon API (#5021) 2023-06-07 21:27:15 +00:00
Etan Kissling 489f688dbc
bump `nim-faststreams` to `2a771bb91f8aae8520a5553955a2acce5fdd0c87` (#5038)
- remove chronos dependency
- fix `finalWrite` for split fixed-size cursors
2023-06-07 11:28:49 +00:00
henridf 3bda24d4d1
Remove unused param from prepareForkedBlockReading (#5037) 2023-06-07 10:39:04 +00:00
Etan Kissling d358aa67cb
bump `nim-serialization` to `bddc53901201b0df5d50e7b79375f88d17ddb71a` (#5036)
- nim devel workaround
- upgrade github actions to v3
- switch CI to the supported version of ubuntu
2023-06-06 23:05:13 +00:00
tersec 30c859e8a4
update some consensus-spec URLs to v1.4.0-alpha.1 (#5035) 2023-06-06 17:09:48 +00:00
tersec 38a6706509
initial version of mock builder relay (#5034) 2023-06-06 15:21:15 +00:00
tersec 58e3de3bf2
add REST call signatures for getStateRandao and getNextWithdrawals (#5033) 2023-06-06 10:01:05 +00:00
Jacek Sieka fc833d40f6
bump chronos (#5032)
* ratelimiter crash fix
* implicit returns now available!
2023-06-05 18:52:16 +00:00
henridf c2aa8313c3
Sync: fix backfill blob iteration order (#4993)
* Sync: fix backfill blob iteration order

* Address review feedback

* Add comment clarifying reason for func top-level placement
2023-06-05 14:42:27 +00:00
jangko a24f3cde7e
more flexible compile time resource path 2023-06-05 12:52:25 +07:00
Etan Kissling d99caf1ad9
fix `Access-Control-Allow-Origin` response (#5028)
Since #3976, CORS functionality is broken. Fix it to work again:

- Use `--rest-allowed-origin` instead of `--keymanager-allowed-origin`
  to specify CORS `Access-Control-Allow-Origin` header for beacon-APIs.

- Actually pass CORS config to `nim-presto` once more.
2023-06-04 16:46:00 +00:00
Etan Kissling 336acbd39b
display `ExecutionAddress` as hex string (#5029)
When logging `ExecutionAddress`, serialize it as a hex string instead of
as a byte array.
2023-06-04 16:15:14 +00:00
Etan Kissling 12381d5f33
also pack attestations where LMD vote is orphaned (#5002)
* also pack attestations where LMD vote is orphaned

When `attestation.data.beacon_block_root` gets orphaned, attestations
with a good `attestation.data.target.root` may still be valuable.
The LMD GHOST vote is not relevant for attestation rewards.

Switch to use the FFG vote (`attestation.data.target.root`) instead,
gossip validation ensures it is an ancestor of `beacon_block_root`.

* lint
2023-06-04 10:39:12 +00:00
tersec f86febc111
update consensus spec URLs to v1.4.0-alpha.1 (#5027) 2023-06-04 10:32:50 +00:00
Jacek Sieka eb5ec3330d
bump chronos (#5024)
* bump chronos

* asyncevent memory hogging fix

* fixup

* fixup

* Revert fixes.
Bump proper chronos version.

---------

Co-authored-by: cheatfate <eugene.kabanov@status.im>
2023-06-03 23:55:58 +02:00
tersec b25ca0833b
use v1.4.0-alpha.1 consensus spec test vectors (#5026) 2023-06-03 21:55:08 +00:00
tersec e6a5f03717
add comment to state diffs explaining eth1 vote tracking (#5023) 2023-06-03 17:48:19 +00:00
Zahary Karadjov e6ed11fc33
Restore the ability to test the Web3Signer (don't enable it in CI yet) 2023-06-03 00:41:57 +03:00
tersec ee71b6cc36
update consensus spec URLs to v1.4.0-alpha.0 (#5022) 2023-06-02 12:59:38 +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
Etan Kissling 005a35597f
handle one of the `ProveField` warnings (#5013)
* handle one of the `ProveField` warnings

When assigning between `ForkyHashedBeaconState`, suppress `ProveField`
warning, as `tgt.kind == src.kind` was already checked, but compiler
doesn't understand that (as we only `case tgt.kind`).

* Update beacon_chain/spec/forks.nim

* Update beacon_chain/spec/forks.nim
2023-06-02 01:25:49 +00:00
Etan Kissling d7890ac013
avoid port number conflict in `test_signing_node` (#5018)
Allow multiple copies of `test_signing_node` to run concurrently by
ensuring that they use unique network port numbers.
2023-06-01 09:33:25 +00:00
Etan Kissling cb25e11252
bump `nim-chronicles` to `533022be6afee15800148a30b502b8ca9e327377` (#5017)
* bump `nim-chronicles` to `533022be6afee15800148a30b502b8ca9e327377`

- Fix registry locking when threading disabled
- Fix for styleCheck:usages (v0.10.2)
- Setup for Nimble 1.4.0

* lint
2023-06-01 10:05:52 +02:00
tersec 7a7573d7d0
fix chronos done -> completed deprecation warnings (#5016) 2023-06-01 10:04:30 +02:00
Etan Kissling 1086909e0b
ensure `quit` on config error with `IOError` (#5011)
When there is an `IOError` while logging a configuration error,
we don't actually `quit` the program. Catch `IOError` to always `quit`.
2023-05-31 20:21:49 +00:00
Etan Kissling 6cd63a89d8
annotate `secondarySources` with `{.raises.}` (#5012)
`sources.addConfigFile` may raise `ConfigurationError`, annotate caller
to propagate that error explicitly.
2023-05-31 19:28:33 +00:00
Etan Kissling 73b3f40e8d
use correct exception in `parseCmdArg(enr.Record)` (#5009)
* use correct exception in `parseCmdArg(enr.Record)`

`parseCmdArg` is expected to raise `ValueError` but for `enr.Record` we
currently raise `ConfigurationError`. Change to `ValueError` instead.

* lint
2023-05-31 19:07:06 +00:00
Jacek Sieka 021babd56d
bump chronos (#5000)
* bump chronos

* bump

* bump

* bump
2023-05-31 17:28:14 +00:00
tersec bc458921ec
don't require optional fields importing slashing protection information (#4997) 2023-05-31 18:51:00 +03:00
Etan Kissling c036de5973
bump `nim-toml-serialization` to `67ba6fbd64f4345db6e590a87c252e7b5a934ffd` (#5008)
- use string value when encoding enums
2023-05-31 08:43:24 +00:00
Etan Kissling a10d193aec
bump `nim-json-serialization` to `ed4440d881f9e2cb7778c01a0f638d928f339aa7` (#5005)
- use string value when encoding enums
2023-05-30 23:59:55 +00:00
tersec 3810c1b7d6
Revert "switch back to 20.04 build image (#4976)" (#5006)
This reverts commit f3719621ca.
2023-05-30 22:00:46 +00:00
tersec f3719621ca
switch back to 20.04 build image (#4976) 2023-05-30 21:27:22 +00:00
Etan Kissling 4b6236b6a6
bump `nim-stew` to `7b4c9407f29075d3206123c1a2d87fa74af40fd0` (#5003)
- remove cast warnings
- add `enumStyle` helper macro
2023-05-30 13:59:22 +00:00
tersec c9f1bf21d6
refactor state diffs not to require two states in memory (#4986) 2023-05-30 11:55:32 +03:00