Commit Graph

3598 Commits

Author SHA1 Message Date
Etan Kissling aaaae89445
bump nimbus-build-system (#2898)
Changes:
- QUICK_AND_DIRTY_NIMBLE
- fix build output color on macOS
2021-09-24 15:34:23 +02:00
tersec bef98f6f50
sync committees don't exist in phase 0 (#2894) 2021-09-24 07:39:35 +00:00
Eugene Kabanov 0c635334a2
Sync committee related REST API implementation. (#2856) 2021-09-24 01:13:25 +03:00
tersec 5670d58155
test for newest fork first (#2891) 2021-09-23 06:53:36 +00:00
Etan Kissling c95d4f31ed
improve getStateField compile checks (#2889)
The current `getStateField` implementation fails at run-time when called
on a post-Altair state. This is improved by replacing the `if` structure
with a `case` expression, which is checked for exhaustive coverage at
compile time. Care is taken to preserve the `unsafeAddr` optimization.
2021-09-22 20:06:50 +00:00
Etan Kissling 4491259c52
allow testing with custom cfg (#2884)
This extends some test utilities to allow simulating states that use
a custom RuntimeConfig, e.g., to test with an earlier ALTAIR_FORK_EPOCH.
2021-09-22 17:50:10 +00:00
sacha 2ec34e6761
Book edits (#2887)
* cp

* cp
2021-09-22 15:52:42 +02:00
Zahary Karadjov 9b41bb64da
Register the Altair topics in the valid topics list 2021-09-22 16:28:48 +03:00
Eugene Kabanov b566d4657f
REST /eth/v1/events API call implementation. (#2878)
* Placing callbacks into strategic places.

* Initial events call implementation.

* Post rebase fixes.

* Change addSyncContribution() implementation.

* Add `attestation-sent` event.
Remove gcsafe, raises from callbacks implementations.
Move `attestation-received` fire at the end of attestation processing.

* Address review comments.
2021-09-22 14:17:15 +02:00
Jacek Sieka 0b21ebfe74
readme: update toc 2021-09-22 14:16:36 +02:00
Zahary Karadjov 3d37e08085
Sort the results of queryRandom in best-to-worst order 2021-09-22 14:22:21 +03:00
Zahary Karadjov 02372849f1 The peer cycling takes into accounts the syncnets ENR fields 2021-09-22 09:38:48 +03:00
Jacek Sieka 855d0257ff
update lighthouse bootnodes (#2880)
https://github.com/eth2-clients/eth2-networks/pull/60
2021-09-21 13:34:25 +02:00
Mamy Ratsimbazafy 0dad1ec091
bump taskpools: remove default CPU pinning 2eb22c61b3 2021-09-21 11:09:48 +02:00
Etan Kissling f2edf679bc
block mocking support for Altair (#2867)
The existing functions for mocking blocks only support phase0 blocks.
This extends block mocking support to also support Altair blocks.
2021-09-20 20:20:29 +00:00
Etan Kissling ddbbbae3c8
allow adding Altair test blocks (#2872)
testblockutil currently fails to add test blocks to Altair state because
it assumes phase0 blocks in various places. This patch corrects this
limitation by using forked types internally. Note that existing clients
so far solely operate on phase0 blocks and should eventually be updated.
2021-09-17 10:55:04 +00:00
Mamy Ratsimbazafy aaf1ccde14
Fix new altair blockpool test missing taskpool parameter (#2877) 2021-09-17 10:24:04 +00:00
Mamy Ratsimbazafy 77f4169ffe
bump BLST v0.3.5 (#2876) 2021-09-17 10:20:21 +02:00
Tanguy b9e9483c66
Fallback ping requests on metadata V2 (#2875)
Some clients disable their metadata V1 after the Altair fork, so we are unable to ping them correctly.

This PR adds a fallback to try metadata V2 if V1 fails.
2021-09-17 07:56:30 +02:00
Mamy Ratsimbazafy d1cb5b7220
Parallel attestation verification (#2718)
* Add parallel attestation verification

* Update tests, batchVerify doesn't use the threadpool with only single core (nim-blscurve update)

* bump nim-blscurve

* Debug info for failing eth2 test vectors

* remove submodule eth2-testnets

* verbose debugging of make failure on Windows (libbacktrace?)

* Remove CI debug mode

* initialization convention

* Fix new altair tests
2021-09-17 03:13:52 +03:00
Etan Kissling 7bc1737653
use correct proposer when mocking blocks (#2869)
When creating beacon blocks, the state needs to be advanced to the new
slot to determine the correct proposer index. In #875 a regression got
introduced that removed this logic when mocking blocks. Existing tests
failed to detect this, as they do not make use of the proposer index.
This patch re-introduces the state advancement, fixing the problem.
2021-09-16 15:48:49 +00:00
Etan Kissling 859c1a3c10
allow mocking blocks at any slot (#2873)
Currently, only the function to mock a block at next slot is exported.
A more generic function that allows specifying any slot is available but
not exported. This patch marks that function to also be exported.
2021-09-16 15:39:19 +00:00
Eugene Kabanov 7ab1856c04
SSZ encoded responses for REST API calls. (#2851) 2021-09-16 16:32:32 +03:00
Dustin Brody 6638476b5f discard putative blocks from invalid hardforks 2021-09-16 16:18:40 +03:00
Etan Kissling 7ccaeed4a8 remove forked message accessor
The template `message` extracts fork specific data from a forked block.
However, its current implementation does not compile due to each fork
returning a different type, i.e., the generated `case` code attempts to
return different types from each branch. As the template is unused, it
is safely removed for now.
2021-09-15 13:58:35 +03:00
Zahary Karadjov a71de3feda Address review comments 2021-09-14 12:12:49 +03:00
Zahary Karadjov 3e4faaa213 Add .editorconfig file and remove trailing newlines 2021-09-14 12:12:49 +03:00
Zahary Karadjov add7daa30c Light client sync spec functions 2021-09-14 12:12:49 +03:00
Etan Kissling 7bbe0258d0
allow testing genesis with Altair (#2866)
The mocking framework was limited to chain configurations that do not
include Altair at genesis. This patch extends it so that genesis states
can be generated that are already upgraded to Altair. This is useful for
tests such as eth2spec/test/altair/unittests/test_sync_protocol.py.
2021-09-13 22:56:37 +00:00
Etan Kissling 6826ddb45d remove non-implemented mock genesis arg
The `initGenesisState` function to mock genesis states for testing was
originally introduced with a `genesis_time` parameter in #326. However,
this parameter was never respected and genesis state was always mocked
with `genesis_time` assumed to be 0. Since there is no test overriding
`genesis_time`, the parameter is removed until needed.
2021-09-13 17:36:58 +03:00
tersec 97b0070774
add merge SSZ consensus object tests (#2858)
* add merge SSZ consensus object tests

* add merge attestations, attester slashing, proposer slashing, and voluntary exit test fixtures

* throw catchable exception rather than assert on invalid SingleMemberUnion selector

* hash_tree_root can assert, because it's trusted data by that point

* re-assert on writing, since also trusted data

* beta.4 update

* implement upgrade_to_merge()
2021-09-11 10:01:05 +02:00
tersec 0ad7216bc4
mass update from beta.3 spec refs to beta.4 spec refs (#2862) 2021-09-10 18:56:03 +00:00
tersec 5ea9e0baf3
use v1.1.0-beta.4 test vectors (#2861) 2021-09-10 17:35:14 +00:00
Etan Kissling fa3d7fa086
fix build output color on macOS (#2857)
On macOS, `echo` does not support the `\e` extension from GNU coreutils.
Replacing with the portable `\x1B` to fix Terminal build output colors.
2021-09-09 14:14:19 +02:00
tersec ea722c6f6e
update some spec refs to beta.3 (#2853) 2021-09-08 14:49:04 +00:00
Zahary Karadjov 2121cf1f0d Clarify why 'eth1Network' is an Option type 2021-09-08 15:47:48 +03:00
Etan Kissling b6334e0970
update research VCS ignores (#2849)
In edd9826464, VCS ignores were introduced
to ignore the output from building and running the research tools from
their directory. Over time, new research tools got introduced, but the
ignore list did not get updated. Updating now for current set of tools.
2021-09-07 23:09:49 +00:00
Kim De Mey ec736bc578
Bump nim-eth vendor module (#2848) 2021-09-06 21:59:20 +02:00
Ștefan Talpalaru 840ef82414
Grafana dashboards: add a version panel (#2845) 2021-09-02 21:20:26 +02:00
Mamy Ratsimbazafy 315c981f6f
Add aggregates/slot to the default dashboard (#2844) 2021-09-02 21:09:21 +02:00
tersec 9c0d9b546a
successfull -> successful (#2842) 2021-09-01 18:08:24 +02:00
Etan Kissling 7b6976d3fd
bump Nim version in developer docs (#2841)
The developer documentation contains a comment mentioning the version of
Nim that the project is tested against. This comment was not updated for
a while (last Nim update in #2508). Bumping now to be in sync once more.
2021-09-01 14:55:54 +02:00
tersec 9e145afda3
update 29 Altair spec ref URLs to beta.3 (#2839) 2021-08-31 12:16:27 +00:00
Zahary Karadjov 7d1efa443d Restore the sync committee pool pruning and add tests 2021-08-30 11:06:45 +03:00
zah 3689c68cbf
Carry out the sync committee gossip duties
Other changes:

* Add server getBlockV2(), and produceBlockV2().
* Add getBlockV2() to REST test suite.
* Add client getBlockV2(), and produceBlockV2().
* Fix URLs in comments.
* Add some primitives and fix some issues in forks.nim.
* Switch `validator_client` to V2 calls usage.
* Bump `chronos` with imports fixes.
* Bump `nim-json-serialization` for `requireAllFields`.
2021-08-30 03:58:30 +03:00
tersec 82eac7a522
add additional REST test suite rules (#2835) 2021-08-29 18:12:24 +00:00
tersec 2d8a796a93
altair-capable beacon block creation (#2834)
* altair-capable beacon block creation

* update block_sim to use sync committees and the new block production interface
2021-08-29 14:50:21 +00:00
tersec 3efcdb0de5
subscribe to/unsubscribe from sync committee subnets (#2832) 2021-08-29 05:58:27 +00:00
Ștefan Talpalaru b1ed4d6ef4
add metrics.status.im Grafana dashboard (#2817)
and simplify queries for the old one
2021-08-28 22:51:10 +00:00
tersec 0418fbada2
introduce SyncCommitteeMsgPool to eth2_processor and nimbus_beacon_node (#2831) 2021-08-28 22:27:51 +00:00