Hsiao-Wei Wang
e56bbb8c44
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests
2021-11-17 18:00:35 +08:00
Hsiao-Wei Wang
79f1f16adf
Clean `PowBlock.difficulty` leftover
2021-11-16 22:08:00 +08:00
Hsiao-Wei Wang
2b9692a22c
Add a test to cover the case of `is_execution_enabled` result is false
2021-11-16 21:56:55 +08:00
Hsiao-Wei Wang
63c9e5ea56
Minor refactoring and add comments
2021-11-16 00:32:29 +08:00
Hsiao-Wei Wang
f0bb032eb1
Fix `test_transition_with_one_fourth_exiting_validators_exit_at_fork` assertions
2021-11-15 23:46:40 +08:00
Hsiao-Wei Wang
f643554aa5
Fix issue around on_attestation validation by skipping epoch scope
...
validation if attestation is from a block message
2021-11-13 18:28:05 +08:00
Danny Ryan
cd3d2ce692
working through test issues
2021-11-12 12:43:54 -07:00
Hsiao-Wei Wang
49d96f92ef
Add a sample altair-to-merge-only transition
2021-11-12 17:06:10 +08:00
Hsiao-Wei Wang
e70da78377
Merge branch 'dev' into transition-reuse
2021-11-12 15:57:27 +08:00
Danny Ryan
342171f441
version.txt bump to v1.1.5
2021-11-08 07:50:54 -07:00
Mikhail Kalinin
f463c32879
Apply feedback from the review of test_validate_merge_block
2021-11-06 10:21:56 +06:00
Mikhail Kalinin
56bb393eb5
Refine validate_merge_block unit tests
2021-11-05 19:56:53 +06:00
Danny Ryan
1361078a75
bump VERSION.txt to 1.1.4
2021-11-02 09:38:49 -06:00
Hsiao-Wei Wang
0641d1c184
`ALL_FORKS` sounds like a list of fork names. Rename it to `ALL_FORK_UPGRADES`
2021-11-02 19:01:32 +08:00
Hsiao-Wei Wang
fa4dc0c168
Apply suggestions from code review
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2021-11-02 18:38:24 +08:00
Hsiao-Wei Wang
0b0fe15c75
Make altair transition tests support merge forks
2021-11-02 14:47:24 +08:00
Danny Ryan
7a5eec3c5f
Merge pull request #2704 from ethereum/disable-too-slow-fork-choice-tests
...
Disable some too-slow mainnet preset fork choice tests
2021-11-01 12:23:23 -06:00
Danny Ryan
7e3ccb706d
remove block_number validation from CL
2021-11-01 07:57:49 -06:00
Danny Ryan
52a97ab494
remove gas validations from CL
2021-11-01 07:39:13 -06:00
Danny Ryan
78040ac3ae
update penalty params for Merge
2021-10-29 12:41:38 -06:00
Hsiao-Wei Wang
314840117d
Add `test_invalid_previous_source_root` and fix `test_invalid_current_source_root`
2021-10-26 16:04:52 +08:00
Hsiao-Wei Wang
405f2e2c2f
Update tests/core/pyspec/eth2spec/test/conftest.py
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-10-21 23:21:56 +08:00
Hsiao-Wei Wang
cb513aa82d
--fork cli option: fix the case of unset directory path + validate fork name
2021-10-21 12:26:11 +08:00
Hsiao-Wei Wang
4f3637851c
Disable some too-slow mainnet preset fork choice tests
2021-10-19 00:54:29 +08:00
Hsiao-Wei Wang
afb62eebf0
Add pytest CLI option `--fork` so that we can just run with specific phase (fork)
2021-10-18 17:59:55 +08:00
Danny Ryan
c5b169bd62
fix issue with mutation in test generation
2021-10-15 16:15:37 -06:00
Alex Stokes
aa91788dfb
Yield the `pre` state for this test type before making blocks
2021-10-15 19:46:46 +01:00
Danny Ryan
a05a78246f
bump version.txt to 1.1.3
2021-10-15 09:47:24 -06:00
Alex Stokes
bf01e11cae
Merge pull request #2664 from ethereum/new-transition-test-cases
...
Add new Altair transition tests
2021-10-15 09:38:24 -06:00
Hsiao-Wei Wang
e70ef11b4d
Fix SSZ underflow
2021-10-15 22:49:43 +08:00
Hsiao-Wei Wang
7480fad8cd
Add `test_transition_with_activation_at_fork_epoch`
2021-10-15 22:46:16 +08:00
Hsiao-Wei Wang
b0b3733243
Fix `randomize_state` default params
2021-10-15 22:18:13 +08:00
Hsiao-Wei Wang
40869d6e39
PR feedback on `exit_random_validators` helper
2021-10-15 22:14:30 +08:00
Hsiao-Wei Wang
be6d2017bb
fix typo
2021-10-15 22:05:07 +08:00
Hsiao-Wei Wang
162711ea56
PR feedback. Rework `transition_to_next_epoch_and_append_blocks` a bit
2021-10-15 22:00:48 +08:00
Hsiao-Wei Wang
a4e5d50660
Fix/ignore mainnet preset cases
2021-10-15 11:57:10 +08:00
Hsiao-Wei Wang
52235a9e40
minor: Use pre spec for running `prepare_state_and_deposit`
2021-10-15 00:44:11 +08:00
Hsiao-Wei Wang
f62167c4ab
pr feedback
2021-10-15 00:30:24 +08:00
Hsiao-Wei Wang
3a242a1e0b
Refactor and add test cases of having operation right before the fork
2021-10-15 00:02:33 +08:00
Hsiao-Wei Wang
49bf78d431
PR feedback
2021-10-14 22:40:29 +08:00
Hsiao-Wei Wang
cbba5426fe
PR feedback
2021-10-14 20:22:03 +08:00
Hsiao-Wei Wang
67da1ba2bf
Minor refactoring
...
- sanity check: deposit operation is independent of spec fork versions
- refactoring
- add comments
2021-10-14 00:06:29 +08:00
Hsiao-Wei Wang
53d4fa5187
Make operation (attester_slashing, proposer_slashing, voluntary_exit) at the fork block
2021-10-13 02:01:13 +08:00
Hsiao-Wei Wang
f0980a4ab9
Refactoring. Sort tests to specific files.
2021-10-13 00:26:23 +08:00
Hsiao-Wei Wang
95f940cc74
ensure that some of the current sync committee members are the slashed
2021-10-12 23:33:48 +08:00
Hsiao-Wei Wang
4dd8b7c98a
[WIP] Add new transition tests
2021-10-12 23:05:14 +08:00
Danny Ryan
e5bbbc5191
base_fee_per_gas to uint256
2021-10-11 16:25:01 -06:00
Danny Ryan
154212dc58
bump VERSION.txt to v1.1.2
2021-10-07 11:54:58 +03:00
Hsiao-Wei Wang
ff15d0bc39
Apply PR feedback from @ralexstokes
2021-10-07 16:04:06 +08:00
Hsiao-Wei Wang
4ae8fb182e
Fix `run_sync_committee_sanity_test` so that it works with duplicate committee indices
2021-10-07 03:29:09 +08:00
Hsiao-Wei Wang
dcdbff0728
Combine the conflicting handler names
2021-10-07 02:11:50 +08:00
Danny Ryan
dd6f09dab8
bump version.txt to v1.1.1
2021-10-04 08:06:04 +03:00
Hsiao-Wei Wang
f1f082fbe7
Remove the unused stub constants
2021-10-04 00:30:01 +08:00
Hsiao-Wei Wang
e235aa8296
Clean up. Add `execution_payload_header` to initialization `meta.yaml`
2021-10-03 22:38:05 +08:00
Danny Ryan
789eea0060
fix tests. add new generator
2021-10-03 16:19:50 +03:00
Hsiao-Wei Wang
296f9bab81
Merge pull request #2638 from etan-status/exec-payload-time
...
use correct timestamp for empty ExecutionPayload
2021-10-02 14:44:20 +08:00
Etan Kissling
65649c0383
use correct timestamp for empty ExecutionPayload
...
There are two similar functions to compute the timestamp for a given
beacon chain slot. `compute_time_at_slot` is used for processing Eth1
votes, and does not take into account `GENESIS_TIME`. The other one,
`compute_timestamp_at_slot`, is used everywhere else. When processing
`ExecutionPayload`, the `merge/beacon-chain.md` spec uses the latter,
`compute_timestamp_at_slot`, to verify the timestamp. However, in the
test code, `build_empty_execution_payload` uses `compute_time_at_slot`.
This patch changes the test to use the same function for creating the
timestamp that is later used to verify it. Note that `GENESIS_TIME` is 0
so there is no practical difference.
2021-10-01 14:52:30 +02:00
Etan Kissling
939e6c7e8e
run tests against future forks by default
...
Some tests are currently restricted to a single phase using @with_phases
even though they could likely run unchanged in later phases. This patch
changes the default for such tests to also run in later phases. If the
beacon chain changes enough in later phases to break these tests, this
highlights that the tests need to be adjusted or extended accordingly.
2021-09-30 10:28:02 +02:00
Danny Ryan
d34b79f4de
Merge pull request #2630 from ethereum/tests/merge-clean-up
...
#2598 + cleanups
2021-09-27 11:23:30 -06:00
Danny Ryan
334e3138fa
Merge pull request #2628 from ethereum/bump-version
...
bump VERSION.txt to 1.1.0
2021-09-27 11:14:37 -06:00
Hsiao-Wei Wang
ef51e1cfb9
Change mainnet `TERMINAL_TOTAL_DIFFICULTY` placeholder to `2**256-2**10` to avoid overflow
2021-09-28 01:02:53 +08:00
Hsiao-Wei Wang
5ab2824427
Clean up, refactor test_transition.py
2021-09-28 00:59:03 +08:00
Hsiao-Wei Wang
2fa595f784
Apply the trivial suggestions
2021-09-28 00:17:18 +08:00
protolambda
bd8c978965
move merkle tests, output proof.yaml, update format
2021-09-27 18:07:59 +02:00
Etan Kissling
e7317e2283
merkle proof test generator
...
Building merkle proofs is required functionality for implementing light
client sync. Although the spec currently only defines a function to
verify merkle proofs (`is_valid_merkle_branch`) there are still a few
PySpec unit tests that produce merkle proofs. This patch adds a new
generator to extract test vectors from those static unit tests, so that
light client implementations can validate their merkle proof logic.
2021-09-27 17:34:51 +02:00
Danny Ryan
c8d05c60ec
Apply suggestions from code review
2021-09-27 08:23:02 -06:00
Danny Ryan
42ef3548e1
bump VERSION.txt to 1.1.0
2021-09-27 08:01:27 -06:00
Dmitrii Shmatko
deb4dbd9c8
Make empty pow_block hash generation Python 3.8 compatible
2021-09-25 01:26:01 +03:00
Danny Ryan
8d5106808f
bump version to v1.1.0-beta.5
2021-09-24 12:26:40 -06:00
Dmitrii Shmatko
f8b3a67152
Fixed test_on_merge_block tests
2021-09-24 21:06:02 +03:00
Dmitrii Shmatko
457b0396dd
update PowBlock generation with random hash
2021-09-24 20:25:18 +03:00
Danny Ryan
940d6b1cc5
Merge pull request #2613 from mkalinin/execution-engine-update
...
Update execution engine calls
2021-09-24 05:57:27 -06:00
Dmitrii Shmatko
f3f1c86a57
Fixed imports in merge tests
2021-09-23 23:13:04 +03:00
Dmitrii Shmatko
1ecfc4016c
Polishing merge tests
2021-09-23 23:10:29 +03:00
Dmitrii Shmatko
8ae078a4f5
Merge branch 'dev' into tests/merge
2021-09-23 22:24:33 +03:00
Dmitrii Shmatko
239653ea01
Fixed lint errors for `test_on_merge_block.py`
2021-09-23 22:24:02 +03:00
Dmitrii Shmatko
b1aa227983
Added `on_merge_block` client tests
2021-09-23 22:22:34 +03:00
Etan Kissling
0c65f79d82
fix merkle proof test for mainnet
...
The `test_next_sync_committee_tree` currently only supports the minimal
preset, as it incorrectly initializes the `next_sync_committee`. On the
mainnet preset, `SYNC_COMMITTEE_SIZE` is 512, but the default states use
only 256 validators, leading to an IndexError during the test execution.
`next_sync_committee` is already initialized correctly prior to the test
run using the spec's `get_next_sync_committee` function, which fills up
extra committee slots with duplicate validators in this scenario. This
makes it unnecessary to manually initialize the `next_sync_committee`.
Removed the incorrect initialization to allow testing on mainnet preset.
2021-09-23 15:20:18 +02:00
Mikhail Kalinin
7d577ed422
Introduce ExecutionAddress type
2021-09-23 14:35:55 +06:00
Mikhail Kalinin
8cecf405cb
Merge branch 'dev' into execution-engine-update
2021-09-22 17:47:02 +06:00
Dmitrii Shmatko
cdcf366007
merge tests updated to be in line with transition_store removal
2021-09-21 15:20:19 +03:00
Dmitrii Shmatko
8bfa5188c1
Merge branch 'hardcoded-ttd' into tests/merge
2021-09-20 22:26:35 +03:00
Danny Ryan
e2af59c8cd
ensure random is validated for all payloads including transition
2021-09-20 23:18:39 +06:00
Mikhail Kalinin
cb9e65ab85
Bring on extra_data field
2021-09-20 23:18:39 +06:00
Mikhail Kalinin
b530e01761
Update calls to execution_engine
2021-09-20 20:57:45 +06:00
Danny Ryan
5811046f1a
Merge pull request #2581 from mkalinin/set-random-to-prev-randao-mix
...
Set the value of the random field to the previous randao_mix
2021-09-20 08:17:55 -06:00
Danny Ryan
3ef13561e6
ensure random is validated for all payloads including transition
2021-09-17 11:00:32 -06:00
Mikhail Kalinin
c2084ad5b0
Bring on extra_data field
2021-09-17 18:23:21 +06:00
Mikhail Kalinin
26c78b540a
Fix test_blocks#test_parent_from_same_slot
2021-09-17 16:01:15 +06:00
Mikhail Kalinin
df657f7c93
Merge branch 'dev' into set-random-to-prev-randao-mix
2021-09-17 14:41:43 +06:00
Etan Kissling
370b9e86e3
pass sync committee sig consistently in tests
...
There are three defined unit tests for the light client sync protocol.
They all follow a similar structure. However, there is an inconcistency
how they pass the slot to compute_aggregate_sync_committee_signature.
In one instance it is passed as `block.slot`. In the other two cases
it is passed as `block_header.slot`. As the `block_header` is created
from the `block`, they share the same value. This patch makes the way
how the slot is passed consistent across all of the test cases.
2021-09-15 21:34:10 +02:00
Dmitrii Shmatko
b99720ec26
Renamed test_on_block -> test_terminal_validity to avoid misleading as generator test
2021-09-14 17:56:49 +03:00
Dmitrii Shmatko
cf1bd6ccc0
Fixed lint errors for merge tests
2021-09-14 15:26:10 +03:00
Dmitrii Shmatko
7ff173bd0b
Added new Merge tests
2021-09-14 11:51:37 +03:00
Danny Ryan
70de0c3fa3
Merge pull request #2594 from ethereum/fix-agg-test
...
fix sync agg test for mainnet
2021-09-09 20:05:10 -06:00
Danny Ryan
d6b5cbd94c
fix sync agg test for mainnet
2021-09-09 19:53:30 -06:00
Danny Ryan
8f064d104f
bmp version.txt to 1.1.0-beta-4
2021-09-09 17:11:27 -06:00
Danny Ryan
a3e2e79ce7
Merge pull request #2591 from ralexstokes/add-exited-sync-comm-member-test
...
Add sync committee tests with exited and withdrawable members
2021-09-09 17:09:10 -06:00
Alex Stokes
0cee5660db
pr feedback
2021-09-09 15:43:42 -07:00
Danny Ryan
b660892ca3
Merge pull request #2586 from ethereum/churn-test
...
Add churn tests for when churn limit scales with v-set size
2021-09-09 16:41:37 -06:00
Danny Ryan
5348b9a3b9
randomize state can result in some exited vals for current epoch
2021-09-09 15:56:08 -06:00
Danny Ryan
a47ade3ba6
pr feedback
2021-09-09 15:27:23 -06:00
Alex Stokes
c0994e6736
Add sync committee tests with exited and withdrawable members
2021-09-09 13:27:54 -07:00
Alex Stokes
989cd38041
add rewards spec test with exit in current epoch
2021-09-08 20:24:22 -07:00
Hsiao-Wei Wang
d23444a2db
Merge pull request #2577 from ethereum/fix-fork-choice-tests
...
Fix fork choice `on_block` tests and update test format
2021-09-08 21:35:32 +08:00
Danny Ryan
8220f7dd44
ensure new dynamic queue tests don't run for mainnet cofig
2021-09-08 07:31:13 -06:00
Hsiao-Wei Wang
5bc59d8aab
Fix the comments
2021-09-08 21:22:48 +08:00
Danny Ryan
6784025d64
add scaled churn limit tests for voluntary exits
2021-09-07 20:49:54 -06:00
Danny Ryan
43e79a7ee0
add process_registry_updates tests for scaled churn limit
2021-09-07 20:34:28 -06:00
Danny Ryan
4faff4f899
Merge pull request #2580 from ralexstokes/add-rewards-test-case-for-exited-vals
...
Add test cases to ensure coverage with exited validators
2021-09-07 16:11:53 -06:00
Alex Stokes
14f71ffb4b
Use realistic `withdrawable_epoch` in spec test
2021-09-07 12:53:06 -07:00
Alex Stokes
064b489d18
Use spec function for total active balance
2021-09-07 12:23:57 -07:00
Alex Stokes
fb4a4f6694
Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate_random.py
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-07 13:09:23 -06:00
Danny Ryan
ccd48d7286
Merge pull request #2579 from ethereum/fix-process_and_sign_block_without_header_validations
...
Fix testing helper `process_and_sign_block_without_header_validations`
2021-09-07 12:57:26 -06:00
Alex Stokes
25c290474f
fix test filtering on eth1 voting spec test
2021-09-02 15:50:26 -07:00
Alex Stokes
4168943ecf
Update tests/core/pyspec/eth2spec/test/helpers/random.py
2021-09-02 15:38:52 -06:00
Alex Stokes
30596fb8a1
Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate_random.py
2021-09-02 15:35:15 -06:00
Alex Stokes
d834b6e800
add active/exited balances test for justification
2021-09-02 12:37:11 -07:00
Alex Stokes
bd38587a1e
add active/exited balances test for `process_slashings`
2021-09-02 09:50:40 -07:00
Alex Stokes
ad076697f4
add test case for active/exited difference for sync rewards processing
2021-09-02 09:50:39 -07:00
Alex Stokes
df89763777
ensure balance differential as a sanity check
2021-09-02 08:48:32 -07:00
Alex Stokes
58c0da9059
ensure rewards spec test with exited validators
2021-09-02 08:48:32 -07:00
Alex Stokes
0cc5f9cd59
modify helper for more precision on exited validators
2021-09-02 08:48:32 -07:00
Alex Stokes
cf23cd00ab
ensure the test covers exited, unslashed validators
2021-09-02 08:48:32 -07:00
Alex Stokes
7cb5901ee6
add spec test case for rewards with exited validators and _no_ leak
2021-09-02 08:48:31 -07:00
Alex Stokes
e341f4e1f8
refactor "leaking patch" helper
2021-09-02 08:48:31 -07:00
Antonio Sanso
ae8c0447ef
Update tests/core/pyspec/eth2spec/test/altair/block_processing/sync_aggregate/test_process_sync_aggregate.py
...
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
2021-09-02 14:57:47 +02:00
Antonio Sanso
5f1a444e70
Update test_process_sync_aggregate.py
2021-09-02 11:34:42 +02:00
Antonio Sanso
2206a58335
Update test_process_sync_aggregate.py
2021-09-02 11:33:12 +02:00
Antonio Sanso
2d736139d5
Update test_process_sync_aggregate.py
2021-09-02 11:19:58 +02:00
Antonio Sanso
9bf8ad9130
Update test_process_sync_aggregate.py
2021-09-02 11:00:51 +02:00
Mikhail Kalinin
6ba1f22404
Set ExecutionPayload.random to the previous randao_mix
2021-09-01 18:42:58 +06:00
Hsiao-Wei Wang
4c34518edf
Call Altair and Merge operations in `process_and_sign_block_without_header_validations`
2021-09-01 00:23:42 +08:00
Hsiao-Wei Wang
b23ed05eee
[`test_on_block_finalized_skip_slots`] Make target state right after skipped slots
2021-08-31 18:40:26 +08:00
Hsiao-Wei Wang
9b065c7816
To avoid using non-genesis anchor state, rewrite `test_on_block_finalized_skip_slots_not_in_skip_chain`
2021-08-31 17:42:10 +08:00
Hsiao-Wei Wang
da8d22c754
Update `checks` Checkpoint fields
2021-08-31 13:16:19 +08:00
Hsiao-Wei Wang
189a9d4ae9
Add the missed on_tick output and remove the useless on_tick call
2021-08-31 12:10:47 +08:00
Alex Stokes
2477deaf13
Allow test driver to batch test cases under one handler name with a list
2021-08-30 13:53:05 -07:00
Alex Stokes
387113b2f4
add "collect only" mode to spec test generator
2021-08-30 13:36:01 -07:00
Danny Ryan
125bf22494
Merge pull request #2570 from ralexstokes/fix-deposits-randomized-tests
...
Fix randomized deposit testing
2021-08-26 17:47:03 -06:00
Danny Ryan
c45e77b0b5
Merge pull request #2571 from ralexstokes/add-timing-info-to-test-gen
...
add timing information to spec test generation
2021-08-26 17:14:52 -06:00
Alex Stokes
74fcf67cf4
Fix a performance bug with the randomized block tests from #2560
2021-08-26 13:42:12 -07:00
Alex Stokes
9474f0a051
construct and supply scenario-wide state to facilitate deposit processing
2021-08-26 12:02:59 -07:00
Alex Stokes
b45601f44c
add timing information to spec test generation
...
in particular, warn if any particular operation takes longer than
some threshold, e.g. 1.0 second.
2021-08-26 11:50:24 -07:00
Alex Stokes
1f34ef9b56
modularize the random deposit helpers
2021-08-26 10:50:50 -07:00
Danny Ryan
17fece57b6
Merge pull request #2560 from ralexstokes/add-broad-spectrum-spec-tests
...
Broad-spectrum randomized block tests
2021-08-25 20:34:47 -06:00
Alex Stokes
874ea80cb8
use more precise name for altair block randomizer and re-gen tests
2021-08-25 17:18:02 -07:00
Alex Stokes
5b0d2627c3
apply pr feedback on randrange
2021-08-25 15:13:20 -07:00
Alex Stokes
c206a2772a
update docs via PR feedback
2021-08-25 14:46:17 -07:00
Alex Stokes
e2dc9f9ec2
update generation of randomized scenarios for more variability
2021-08-25 14:42:41 -07:00
Alex Stokes
047ff5b099
unify visibility on names for doc purposes
2021-08-25 14:16:39 -07:00
Alex Stokes
961953ac15
update parameter name
2021-08-25 13:10:41 -07:00
Alex Stokes
377797fd0d
code layout change
2021-08-25 11:20:17 -07:00
Alex Stokes
14518d4d64
update name of utility module to be more specific
2021-08-25 11:15:59 -07:00
Alex Stokes
0da1fe947d
clarify how the random block generator works
2021-08-25 11:09:35 -07:00
Alex Stokes
e72edf07f9
consolidate call to `max` into `randrange`
2021-08-25 10:40:15 -07:00
Alex Stokes
4d4f4e89f4
be specific about which slot we want a sync committee root for
2021-08-25 10:38:01 -07:00
Alex Stokes
7874e8db88
clean up unnecessary comment
2021-08-24 16:40:16 -07:00
Alex Stokes
33c96127da
fix bug with random sync aggregate helper
2021-08-24 16:40:15 -07:00
Alex Stokes
f7c0dc36be
skip running heavy randomized tests in CI
2021-08-24 15:05:07 -07:00
Alex Stokes
933c1323dd
lint updates
2021-08-24 14:46:31 -07:00
Alex Stokes
8a32bef58b
update skipped test count when test already exists
2021-08-24 13:19:31 -07:00
Alex Stokes
8e5a34c38a
adjust helper to account for additional slashings
2021-08-24 12:46:03 -07:00
Alex Stokes
d1f3ec59af
ensure at least 1 operation when making random block
2021-08-24 11:56:19 -07:00
Alex Stokes
c27e4d140e
move to code-gen under new test generator
2021-08-24 11:56:15 -07:00
Alex Stokes
505bdba8f8
fix imports
2021-08-23 12:49:36 -07:00
Alex Stokes
d037c6662a
lint fix
2021-08-23 12:40:42 -07:00
Alex Stokes
cc04da8e79
add randomized block tests for altair
2021-08-23 12:30:05 -07:00
Alex Stokes
58c6f33e85
ensure at least one proposer slashing
2021-08-23 12:15:22 -07:00
Alex Stokes
7b9d70fcec
allow test customization (for future forks)
2021-08-23 12:15:09 -07:00
Alex Stokes
ff6863e689
fix bug with deposit generation code
2021-08-23 12:01:05 -07:00
Alex Stokes
31d46247ce
file re-org to re-use for later forks
2021-08-23 11:48:22 -07:00
Alex Stokes
20e3934fa2
do not exit validators who are already exited
2021-08-23 11:46:20 -07:00
Alex Stokes
16423880aa
add multiple blocks to each test
2021-08-23 11:00:33 -07:00
Alex Stokes
6316c7d364
ensure at least 1 attester slashing
2021-08-23 10:29:39 -07:00
Alex Stokes
361d97c54b
fix bug with proposer search
2021-08-23 10:13:19 -07:00
Hsiao-Wei Wang
15a6c48a46
Merge pull request #2518 from ethereum/fix-store-justified-checkpoint
...
Fix fork choice store checkpoints inconsistency issue
2021-08-23 23:41:11 +08:00
Hsiao-Wei Wang
838c263c4a
Apply suggestions from code review
...
Co-authored-by: Aditya Asgaonkar <adiasg@users.noreply.github.com>
2021-08-23 23:21:15 +08:00
Alex Stokes
2db01ba6d0
use fixed seed for block randomization
2021-08-22 13:55:29 -07:00
Alex Stokes
253f927c0a
fix randomness seed across randomized test
2021-08-22 13:55:29 -07:00
Alex Stokes
0c401a3e2a
filter for exit eligibility in helper
2021-08-22 13:55:28 -07:00
Alex Stokes
ce471b702e
code org
2021-08-22 10:54:00 -07:00
Alex Stokes
f76a29c1f9
patch state to not be leaking at start
2021-08-22 10:52:22 -07:00
Alex Stokes
993997aca5
ensure no leak on "normal" transitions
2021-08-22 10:19:21 -07:00
Alex Stokes
270814e20f
fix bug with `_epochs_until_leak` helper
2021-08-22 09:59:28 -07:00
Alex Stokes
820affd2aa
extend validator set so randomized helpers have more room for operation
2021-08-22 09:58:54 -07:00
Alex Stokes
513f57f74c
formatting
2021-08-22 09:56:03 -07:00
Alex Stokes
b17ada2d67
only target phase 0 and altair for now
2021-08-21 18:24:26 -07:00
Alex Stokes
9e6a51ef70
update fn name for test id
2021-08-21 18:10:27 -07:00
Alex Stokes
fde71cbe74
add warnings if empty block
2021-08-21 18:10:27 -07:00
Alex Stokes
7bc2f9547a
skip validators when building a random block if they are slashed
2021-08-21 17:52:26 -07:00
Alex Stokes
86643d805a
adjust some helper code for randomized environment
...
1. randomized block helpers assume most of the validator set is not slashed
2. `randomize_state` helper slashes or exits ~1/2 of the validator set
So, adjust helpers to be less aggresive with exits and slashings and
to skip elements as needed if we happen to make something by
a validator who has been slashed.
2021-08-21 17:36:50 -07:00
Alex Stokes
6da2c7a916
ensure all validators in randomized test are active
2021-08-21 16:59:54 -07:00
Alex Stokes
5094193f9a
formatting
2021-08-21 16:59:02 -07:00
Alex Stokes
619e828898
Progress on block test gen
2021-08-21 15:48:29 -07:00
Alex Stokes
4420d13816
add helper to check existence of many validator types
2021-08-21 15:48:29 -07:00
Alex Stokes
00df808f59
expose functionality to make random block
2021-08-21 15:48:28 -07:00
Danny Ryan
29c7184b7b
bump VERSION.txt to 1.1.0-beta.3
2021-08-20 08:42:22 -06:00
Danny Ryan
f30e7c8ef3
Merge pull request #2559 from ralexstokes/update-full-random-tests-to-all-phases
...
Extend randomized block tests to all phases
2021-08-20 08:20:55 -06:00
Danny Ryan
2c632c0087
Merge pull request #2555 from ethereum/great-renaming
...
modify docs for great renaming
2021-08-20 08:14:49 -06:00
Alex Stokes
eadefa274d
WIP: broad-spectrum randomized block tests
2021-08-19 12:54:21 -06:00
Alex Stokes
cdf1914e98
Extend randomized block tests to all phases
...
Some existing randomized block tests only ran for phase 0,
when they should run for all phases to increase overall test coverage.
2021-08-19 11:00:14 -06:00
Alex Stokes
70d4ddf613
Merge pull request #2556 from ralexstokes/add-randomized-testing-for-altair-inactivity-scores
...
Add randomized testing for altair inactivity scores
2021-08-19 07:42:46 -07:00
Alex Stokes
b809d86736
add test for `process_inactivity_updates` for randomized state
2021-08-19 07:43:16 -06:00
Alex Stokes
7f70a7704b
fix validator state during deposit randomization
2021-08-19 07:43:15 -06:00
Danny Ryan
4c1156d504
rename eth1 and eth2 throughout specs and readme where reasonable
2021-08-18 17:13:24 -06:00
Danny Ryan
f6aa54b66f
Merge pull request #2554 from ralexstokes/refactor-sync-committee-tests
...
Refactor sync committee tests
2021-08-18 16:38:56 -06:00
Alex Stokes
5a918dbdf3
Add test count to test gen diagnostics
2021-08-18 10:49:44 -06:00
Alex Stokes
5a17fa65b2
group test files into subdirectory
2021-08-18 10:49:44 -06:00
Alex Stokes
817d2ee7bf
Refactor sync committee tests so rewards are verified for all test cases
2021-08-18 10:49:43 -06:00
Hsiao-Wei Wang
6ffc735642
Merge branch 'dev' into fix-store-justified-checkpoint
2021-08-17 21:28:42 +08:00
Hsiao-Wei Wang
3a9dcbadf0
Merge pull request #2487 from ethereum/on-block-tests
...
Rework + add some `on_block` tests
2021-08-17 21:21:44 +08:00
Alex Stokes
471cc870c3
remove print statements
2021-08-16 13:10:58 -06:00
Mikhail Kalinin
301157c027
Change base_fee_per_gas type to Bytes32
2021-08-13 14:21:37 +06:00
Danny Ryan
c404cd144a
Merge pull request #2533 from mkalinin/rebase-with-london
...
Rebase Merge spec with London
2021-08-10 16:37:32 -06:00
Danny Ryan
b184fa25a7
Merge pull request #2542 from ralexstokes/add-inactivity-updates-test-with-exited-validator
...
Add test for exited validators during inactivity leak
2021-08-06 08:58:01 -06:00
Alex Stokes
170d7dc023
Update tests/core/pyspec/eth2spec/test/altair/epoch_processing/test_process_inactivity_updates.py
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-08-05 16:54:29 -07:00
Alex Stokes
6f56e33f00
Update tests/core/pyspec/eth2spec/test/altair/epoch_processing/test_process_inactivity_updates.py
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-08-05 16:54:22 -07:00
Hsiao-Wei Wang
93af122b2d
PR feedback from @ralexstokes and add single pubkey aggregate tests
2021-08-05 12:09:30 +08:00
Alex Stokes
2ff143c719
Add test for exited validators during inactivity leak
2021-08-04 16:28:42 -07:00
Hsiao-Wei Wang
43a1617ffa
Ensure that the given PKs are valid PKs + fix typos
2021-08-04 21:25:37 +08:00
Mikhail Kalinin
d58ffc7dfc
Add genesis settings section
2021-07-30 16:10:33 +06:00
Mikhail Kalinin
9a1a30c3d4
Rebase Merge spec with London
2021-07-26 19:55:35 +06:00
Danny Ryan
37da2018a3
bump VERSION.txt to 1.1.0-beta.2
2021-07-23 08:22:53 -06:00
protolambda
8318441474
Fix remaining merge-rebase-altair tests
2021-07-22 19:59:15 +02:00
protolambda
17fad2dea2
rebase The Merge onto Altair base functionality
2021-07-22 16:36:41 +02:00
Alex Stokes
758b828ecb
Update slashing helper to avoid proposer.
...
Fixes #2521 .
2021-07-19 14:20:44 -07:00
protolambda
f16cfe7c3a
update sync aggregate tests
2021-07-17 14:46:25 +02:00
Adrian Sutton
11d54af89d
Add test to confirm infinite signature is invalid when there are participants.
2021-07-17 16:34:41 +10:00
Adrian Sutton
f668b2b433
Add tests for SyncAggregate with no participants and all zero signature.
2021-07-17 16:26:18 +10:00
Danny Ryan
c420968f66
fix last beta.1 mainnet test
2021-07-14 11:11:24 -06:00
Hsiao-Wei Wang
cc3690ce38
Add unit tests to test the new condition.
2021-07-14 20:05:14 +08:00
protolambda
5582490364
Apply missing spec_test decorators, to handle generator_mode flag
2021-07-14 13:40:34 +02:00
Danny Ryan
b25d690ee8
bump VERSION.txt to 1.1.0-beta.1
2021-07-13 16:18:37 -06:00
Hsiao-Wei Wang
93a31f9011
Fix test: use mainnet preset and accept deviation
2021-07-13 00:16:57 +08:00
Danny Ryan
0c01b9e812
Merge pull request #2511 from ethereum/inactivity-updates-tests
...
extend inactivity updates tests
2021-07-08 13:10:48 -06:00
Danny Ryan
f460870c11
clean up some leak tests
2021-07-08 12:50:45 -06:00
Danny Ryan
a5a48d5a23
PR feedback from @ralexstokes
2021-07-08 12:18:54 -06:00
Alex Stokes
19001055e9
Update tests/core/pyspec/eth2spec/test/altair/sanity/test_blocks.py
2021-07-08 06:14:47 -07:00
Danny Ryan
36d2dacdcf
added slashed tests to leak score tests
2021-07-07 16:10:06 -06:00
Danny Ryan
48382ce09c
extend inactivity updates tests
2021-07-07 12:20:34 -06:00
Danny Ryan
3161846aed
Apply suggestions from code review
2021-07-07 10:29:14 -06:00
Alex Stokes
fdcb0780d2
add randomized testing for sync aggregate block processing
2021-07-06 18:13:33 -07:00
Alex Stokes
ac8b4000d3
remove unnecessary assert
2021-07-06 17:28:55 -07:00
Danny Ryan
153e1b34dd
Merge pull request #2504 from ralexstokes/add-altair-process-sync-aggregate-tests
...
add more Altair tests for `process_sync_aggregate`
2021-07-02 15:55:22 -06:00
Danny Ryan
8ad73d75a6
Merge pull request #2505 from ethereum/test_get_sync_subcommittee_pubkeys
...
Add Altair networking helper tests
2021-07-02 15:33:49 -06:00
Danny Ryan
1865cdb4fc
add comment
2021-07-02 15:28:05 -06:00
Alex Stokes
2d4ff72b2d
Update tests/core/pyspec/eth2spec/test/altair/block_processing/test_process_sync_aggregate.py
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-07-02 08:38:03 -07:00
Danny Ryan
3d7471a52c
Merge pull request #2502 from ethereum/sc-update-tests
...
add more process_sync_committee_updates tests
2021-07-02 09:33:35 -06:00
Danny Ryan
e95d71f85d
pr feedback
2021-07-02 09:25:08 -06:00
Hsiao-Wei Wang
7bde1729b1
Add Altair networking helper tests
2021-07-02 14:42:02 +08:00
Alex Stokes
f9b4d7f287
add test for sync aggregate with proposer in sync committee
2021-07-01 17:36:30 -07:00
Alex Stokes
49c433746d
sync aggregate test with proposer in the committee
2021-07-01 17:35:48 -07:00
Alex Stokes
faf1ba1f4f
clean up test
...
this test does not need to collect the intermediate blocks it produces
2021-07-01 17:30:40 -07:00
Alex Stokes
b3a879c990
add tests for duplicated sync committee members with various amounts of participation
2021-07-01 17:30:40 -07:00
Alex Stokes
21aaab5a1e
add test for sync aggregate with bad domain in signature
2021-07-01 17:30:40 -07:00
Alex Stokes
2aa5bf8384
assert active validator set is larger than sync committee size
...
ensure set is larger, rather than just equal to
2021-07-01 16:35:03 -07:00
Danny Ryan
927b26636e
add more test_process_participation_flag_updates tests
2021-07-01 13:12:15 -06:00
Danny Ryan
0ed032d392
add more process_sync_committee_updates tests
2021-07-01 12:53:12 -06:00
Hsiao-Wei Wang
bb327d274e
Add more Altair validator guide unit tests
...
Add `test_get_sync_committee_message`
Add `test_get_sync_committee_selection_proof`
Add `always_bls` deco
Add `test_is_sync_committee_aggregator`
Add `test_get_contribution_and_proof` and `test_get_contribution_and_proof_signature` + fixes
2021-07-01 22:49:23 +08:00
Hsiao-Wei Wang
27763bdd86
clean up
2021-06-30 05:40:26 +08:00
Hsiao-Wei Wang
29a93f6285
Move more unit tests to test vectors
2021-06-30 04:55:41 +08:00
Alex Stokes
44a3113ce1
fix spacing for linter
2021-06-24 09:24:58 -07:00
protolambda
dbf7fbd3d0
encode, decode and randomize ssz Union types
2021-06-24 17:13:36 +02:00
Danny Ryan
989c9620c7
bump VERSION.txt to 1.1.0-alpha.8
2021-06-23 08:32:52 -06:00
Hsiao-Wei Wang
f55afefe90
Move more tests from unittests to testgen tests
...
- `test_on_block_before_finalized`
- `test_on_block_finalized_skip_slots`
- `test_on_block_finalized_skip_slots_not_in_skip_chain`
2021-06-23 04:58:27 +08:00
Hsiao-Wei Wang
69a645aa8b
Apply PR feedback
2021-06-23 04:50:13 +08:00
Hsiao-Wei Wang
88be6cdf60
Apply Danny's suggestions from code review
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-06-22 20:55:52 +08:00
Hsiao-Wei Wang
83598af188
Add `test_new_justified_is_later_than_store_justified` and fix test
...
cases
- Fix `on_tick` calls
- Refactor test cases
2021-06-22 20:04:47 +08:00
Mikhail Kalinin
e5c01061af
Add couple of cosmetic fixes
2021-06-22 14:26:38 +06:00
Mikhail Kalinin
ac19aa3e2d
Accept polishing suggested by Justin
2021-06-22 14:23:26 +06:00
Mikhail Kalinin
199d6aee58
Merge remote-tracking branch 'origin/dev' into randao_in_execution_payload
2021-06-19 00:28:38 +06:00
Hsiao-Wei Wang
2445fe5a76
Add new test cases
...
- `test_new_finalized_slot_is_not_justified_checkpoint_ancestor`
- `test_new_finalized_slot_is_justified_checkpoint_ancestor`
2021-06-19 02:03:37 +08:00
Hsiao-Wei Wang
fb2465db45
Rework `on_block` unit tests
2021-06-19 02:03:33 +08:00
Justin
878b15df6a
polish merge/beacon-chain.md ( #2472 )
...
Polish `merge/beacon-chain.md` with mostly non-substantive changes.
**Non-substantive changes**
* rename `MAX_EXECUTION_TRANSACTIONS` to `MAX_TRANSACTIONS_PER_PAYLOAD`
- rename "execution transaction" to just "transaction" as per discussion with Danny
* rename `compute_time_at_slot` to `compute_timestamp_at_slot`
- the function returns a Unix timestamp
- "timestamp" matches `execution_payload.timestamp`
* be explicit about `ExecutionEngine.execution_state` for clarity
* rename `ExecutionPayload.number` to `ExecutionPayload.block_number`
- more specific ("number" is pretty vague)
- consistent with `ExecutionPayload.block_hash`
* rename `new_block` to `on_payload`
- the `on_` prefix is consistent with other event handlers (e.g. see `on_tick`, `on_block`, `on_attestation` [here](https://github.com/ethereum/eth2.0-specs/blob/dev/specs/phase0/fork-choice.md#handlers ))
- the `_payload` suffix is more to the point given the function accepts an `execution_payload`
- avoids conflict with `on_block` which is already used in the fork choice
* rework the table of contents for consistency
* order `is_execution_enabled` after `is_transition_completed` and `is_transition_block`
- `is_execution_enabled` refers to `is_transition_completed` and `is_transition_block`
* rename "transition" to "merge"
- "transition" is a bit vague—we will have other transitions at future hard forks
- there is no need for two words to refer to the same concept
* add a bunch of inline comments, e.g. in `process_execution_payload`
* make the `process_execution_payload` signature consistent with the other `process_` functions in `process_block` which take as arguments `state` and `block.body`
* remove `TRANSITION_TOTAL_DIFFICULTY`
- to be put in `merge/fork-choice.md` where it is used
* various misc cleanups
**Substantive changes**
* reorder `ExecutionPayload` fields
- for consistency with yellow paper and Eth1
- same for `ExecutionPayloadHeader`
- added comments separating out the execution block header fields from the extra fields (cosmetic)
2021-06-18 11:09:30 +01:00
Mikhail Kalinin
6e86d8a696
Rename randao->random, other fixes as per review
2021-06-17 21:20:17 +06:00
Hsiao-Wei Wang
42eae81013
WIP. Rework on_block tests
2021-06-15 21:52:25 +08:00
Mikhail Kalinin
cc20b80103
Fix linter, add more test helpers
2021-06-15 14:55:06 +06:00
Danny Ryan
5c1cb153aa
Merge branch 'dev' into attester-proposer-slashing
2021-06-14 15:08:10 -06:00
Mikhail Kalinin
95775e1b90
Add randao to execution payload
2021-06-11 16:05:19 +06:00
Danny Ryan
a5762cbad8
add attestesr slashing for proposer, and some future slashing tests woo
2021-06-09 16:56:32 -06:00
Danny Ryan
1ade07d705
fix mismatched proposer test names
2021-06-09 16:31:20 -06:00
Danny Ryan
5d9d786499
Merge pull request #2462 from mkalinin/merge-transition-with-dynamic-ttd
...
Merge transition process with computed transition total difficulty
2021-06-08 09:55:10 -06:00
Danny Ryan
6258dc64f7
bump VERSION.txt to v1.1.0-alpha.7
2021-06-07 17:41:37 -06:00
Danny Ryan
cfc66a3794
patch tests
2021-06-07 16:36:18 -06:00
Danny Ryan
09b6fb0e64
ensure consistency about sync committees vs aggregates in naming throughout
2021-06-07 16:17:46 -06:00
Danny Ryan
b97972c091
Merge pull request #2444 from ethereum/invariant-checks
...
Add some invariant checks to pyspec unit tests
2021-06-07 09:09:56 -06:00
Danny Ryan
ad1e51a2cb
Merge pull request #2435 from ethereum/altair_epoch_tests
...
Inactivity updates test generation, implement new participation flag updates testing
2021-06-07 08:12:41 -06:00
Danny Ryan
8ba740a93a
Merge branch 'dev' into invariant-checks
2021-06-07 08:12:27 -06:00
Danny Ryan
9c78de9d42
pr review
2021-06-07 08:00:03 -06:00
Danny Ryan
6f7e04ef5c
Apply suggestions from hwwhww code review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-06-07 07:56:52 -06:00
Danny Ryan
7710d4fa5c
add a few more preset/config invariants
2021-06-07 07:55:04 -06:00
Danny Ryan
1d5c4ecffb
Merge pull request #2453 from ethereum/vbuterin-patch-11
...
Modify sync committee logic and parameters to reduce variance
2021-06-04 12:23:16 -06:00
Danny Ryan
48ecc98b75
Merge branch 'dev' into altair_epoch_tests
2021-06-02 16:46:30 -06:00
Danny Ryan
d598c09876
Merge pull request #2443 from ralexstokes/fix-altair-transition-test
...
Fix bug in Altair transition tests with missing state root
2021-06-02 11:13:17 -06:00
Hsiao-Wei Wang
67809e76e1
Fix tests
2021-06-02 01:40:54 +08:00
Potuz
c115fa9a86
make it pass the linter
2021-06-02 01:22:27 +08:00
Potuz
b8d426b028
Align Sync Committee Tests to Specs
2021-06-02 01:22:26 +08:00
Mikhail Kalinin
fd4369dc7c
Add merge/fork.md with upgrade_to_merge definition
2021-05-31 19:30:54 +06:00
Diederik Loerakker
f08cc15b8d
Merge pull request #2445 from ethereum/union-type-update
...
Union type update
2021-05-28 20:20:52 +02:00
protolambda
d11586122f
update remerkleable, union support
2021-05-28 01:02:08 +02:00
Hsiao-Wei Wang
cb008f2c1a
Fix _get_sync_committee_signature helper. Should have used `target_slot`
2021-05-26 02:40:22 +08:00
Hsiao-Wei Wang
b5f9b5d74f
Add more checks
2021-05-26 01:21:04 +08:00
Hsiao-Wei Wang
69f2a31406
Add some config invariant checks
2021-05-26 01:10:40 +08:00
Alex Stokes
4664ccbc42
Fix bug in Altair transition tests with missing state root
2021-05-25 09:58:36 -07:00
Alex Stokes
c9f3780565
Clean up outdated attestation helper
2021-05-24 11:54:28 -07:00
protolambda
ed912f599e
add assertions on flag updates
2021-05-22 18:52:29 +02:00
protolambda
4c02dbadd0
enable inactivity updates test generator output, implement new participation flag updates testing
2021-05-22 18:43:29 +02:00
Danny Ryan
51bf8f3985
bump VERSION.txt to 1.1.0-alpha.6
2021-05-21 14:26:40 -06:00
Danny Ryan
a52d67de0f
Merge pull request #2426 from ralexstokes/more-altair-fork-transition-tests
...
More Altair fork transition tests
2021-05-21 13:53:19 -06:00
Danny Ryan
ba6d19308b
Update tests/core/pyspec/eth2spec/test/helpers/attestations.py
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-05-21 13:44:35 -06:00
protolambda
e50d8d4391
Merge branch 'dev' into config-rework
2021-05-20 23:31:49 +02:00
Alex Stokes
b9ad8bca00
Update tests/core/pyspec/eth2spec/test/altair/transition/test_transition.py
2021-05-20 12:07:46 -07:00
Alex Stokes
d04ecf16b1
PR feedback and add two more test cases
2021-05-20 11:55:11 -07:00
Alex Stokes
240209915c
Refactor attestation helper
2021-05-20 11:41:06 -07:00
Alex Stokes
1dfca0e677
Refactor block helper
2021-05-20 11:40:25 -07:00
Alex Stokes
df742ea8af
add fork finality test with random participation
2021-05-19 12:16:24 -07:00
protolambda
c080324e08
set RNG for test case for consistent test outputs
2021-05-19 19:07:24 +02:00
protolambda
46bb8273df
update ejection balance config references
2021-05-19 17:43:56 +02:00
protolambda
291168e1e3
clarify config/preset separation, address review comments by @djrtwo
2021-05-19 17:15:34 +02:00
Alex Stokes
a7346ae384
Add Altair fork tests to test generators
2021-05-18 18:05:07 -07:00
Alex Stokes
7eba1612cf
Add fork transition test that finalizes across fork boundary
2021-05-18 17:43:34 -07:00
Alex Stokes
0ec1ec77b8
Expose attestation helper in pyspec tests
2021-05-18 17:25:51 -07:00
Danny Ryan
19a8076b89
bump VERSION.txt to alpha.5
2021-05-18 15:57:44 -06:00
protolambda
48e1ef193a
update docs with config usage
2021-05-18 21:31:27 +02:00
protolambda
925f0508ce
test generator fixes
2021-05-18 20:13:19 +02:00
protolambda
fb82472b46
update test generators
2021-05-18 18:48:58 +02:00
protolambda
a57ff5fc01
select preset with cli arg
2021-05-18 16:17:02 +02:00
protolambda
f5c647b47b
switch configuration to named tuple for reliable hashing, add test for config override functionality
2021-05-18 16:08:30 +02:00
protolambda
e8b0c46138
misc test fixes for new config approach
2021-05-18 14:45:56 +02:00
protolambda
0894125bf7
update test util
2021-05-18 13:59:26 +02:00
protolambda
1e7c5b1f83
fix config usage of MIN_GENESIS_ACTIVE_VALIDATOR_COUNT
2021-05-18 13:56:42 +02:00
protolambda
d3bf218361
update config usages
2021-05-18 12:56:34 +02:00
protolambda
ccc6679e21
config as dataclass
2021-05-18 12:48:42 +02:00
protolambda
9030270369
update config util to make preset loading optional, update docs
2021-05-18 09:58:54 +02:00
protolambda
cd494707c4
fix lint in config util
2021-05-18 09:58:54 +02:00
protolambda
d0fef3bf3f
update tests with new config util
2021-05-18 09:58:50 +02:00
protolambda
79d0fa037f
updated config util
2021-05-18 09:55:25 +02:00
Danny Ryan
ccacc936de
bmp VERSION.txt to 1.1.0-alpha.4
2021-05-14 06:44:23 -06:00
Danny Ryan
4cd9a6c710
Merge pull request #2385 from ethereum/execution-payload-testing
...
Execution payload tests
2021-05-14 06:40:40 -06:00
Danny Ryan
5dd29b6659
fix tests and minor copy edit
2021-05-14 06:15:48 -06:00
Danny Ryan
049210bd8a
utilize new randomize functions in process_inactivity_updates testing
2021-05-13 13:44:41 -06:00
Danny Ryan
d38af7a158
Merge branch 'dev' into vbuterin-patch-11
2021-05-13 13:39:05 -06:00
Danny Ryan
699a3f837e
pr feedback
2021-05-13 13:38:43 -06:00
Danny Ryan
a52565aa81
add random altair fork tests for better translation coverage + pr review
2021-05-13 13:21:43 -06:00
Danny Ryan
a6d5b2e215
pull state randomization functions out of rewards testing
2021-05-13 08:22:24 -06:00
Danny Ryan
4a91c93962
add epoch processing tests for inactivity udpates
2021-05-12 15:06:32 -06:00
Danny Ryan
fa1bdabace
add random inactivity scores tests
2021-05-12 14:23:11 -06:00
Danny Ryan
a469b467ff
Merge branch 'dev' into keep-inactivity-function
2021-05-12 12:27:15 -06:00
Danny Ryan
133875a6d6
fix sync_committe_update tests
2021-05-12 09:56:13 -06:00
Danny Ryan
a8791f04c7
'get_sync_committee -> get_next_sync_committee
2021-05-12 09:44:13 -06:00
Danny Ryan
1a7aa898ab
Merge branch 'dev' into sync-seed
2021-05-12 08:46:11 -06:00
Danny Ryan
dff12dd644
Merge pull request #2400 from ethereum/sync-committee-off-by-1
...
add logic for handling sync committee off by one issue
2021-05-12 08:45:05 -06:00
Hsiao-Wei Wang
17820e3711
Skip the mainnet config slow tests
2021-05-12 13:02:15 +08:00
Hsiao-Wei Wang
dad698f97a
Update unit tests: add `test_compute_subnets_for_sync_committee_slot_period_boundary`
2021-05-12 12:35:47 +08:00
protolambda
0390ab819a
Protocols pyspec support + execution payload tests cleanup
2021-05-12 02:40:23 +02:00
Danny Ryan
468f42c545
Merge branch 'simplify-sync-committee-calc' into sync-seed
2021-05-11 16:03:19 -06:00
Danny Ryan
200c049778
fix seed calc issue
2021-05-11 15:55:33 -06:00
Alex Stokes
859a7d743e
Only allow sync committee period calculation at period boundaries
2021-05-11 12:42:21 -07:00
Danny Ryan
a9cc036184
remove timely_head penalty
2021-05-11 11:48:26 -06:00
Alex Stokes
e2aa595d5f
PR feedback
2021-05-11 10:16:43 -07:00
Alex Stokes
d744825583
update docs
2021-05-11 10:14:28 -07:00
Alex Stokes
c08fb7714c
More altair fork tests with varied block conditions
2021-05-11 10:14:28 -07:00
Alex Stokes
3f3aa4fb10
add some altair tests
2021-05-11 10:14:28 -07:00
Alex Stokes
0e71496eb5
add "normal" transition test
2021-05-11 10:14:28 -07:00
Alex Stokes
d34b2a08d5
Use `fork_block` index in lieu of fork flag
2021-05-11 10:14:28 -07:00
Alex Stokes
b71aa3fb56
add `transition` spec test format
2021-05-11 10:14:23 -07:00
Danny Ryan
a6b8574962
test
2021-05-10 16:18:42 -06:00
Danny Ryan
77d607a760
fix test
2021-05-10 13:24:14 -06:00
Danny Ryan
dd9fb06d25
Merge branch 'dev' into vbuterin-patch-12
2021-05-10 07:38:32 -06:00
Danny Ryan
2539d4e11d
Merge pull request #2380 from ethereum/merge-test-vectors
...
Merge test vectors: enable phase0 tests for Merge + start on new testing
2021-05-10 07:30:21 -06:00
Mikhail Kalinin
e78e045847
Implement execution payload tests
2021-05-10 16:12:23 +06:00
Alex Stokes
72a4ff803b
add test to ensure sync committees are referenced from the state
2021-05-07 17:07:15 -07:00
protolambda
2bc2a30887
scaffold execution payload tests
2021-05-07 14:36:08 +06:00
Alex Stokes
4c73fec88e
convert `LightClientStore` to python object instead of SSZ object
...
this avoids the type overhead of having to define a max size for
the object's data and skips the overhead of serialization/consensus
for a type that does not need it
2021-05-06 10:52:48 -07:00
protolambda
42733b7e34
remove merge-test exec-payload trigger debug helper
2021-05-06 02:27:05 +02:00
protolambda
76b5974d11
is_execution_enabled function + misc review fixes
...
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
2021-05-06 02:23:13 +02:00
protolambda
56bcb630db
Lint fixes for merge testing update
2021-05-05 17:03:29 +02:00
protolambda
2ef6291cbc
Minimal execution payload test, more merge-specific testing in later PR
2021-05-05 16:41:59 +02:00
protolambda
00cd1c3db7
fix forkchoice unittest not recognizing merge spec
2021-05-05 16:31:28 +02:00
protolambda
865d7db5ca
update altair tests to not collide with Merge + fix merge test triggers
2021-05-05 16:03:52 +02:00
protolambda
ff3a82e0f3
fix transactions field in exec payload helper
2021-05-05 15:40:56 +02:00
protolambda
470c6dcc6f
update test runner to handle merge phase
2021-05-05 15:35:52 +02:00
protolambda
25d0d673a9
start testing of merge functionality
2021-05-05 00:18:01 +02:00
protolambda
ab693c9724
update spec test constants for merge
2021-05-05 00:16:22 +02:00
Danny Ryan
053179cee9
comments and tests on altair
2021-05-04 07:39:22 -06:00
Danny Ryan
2628721f96
Merge pull request #2323 from ethereum/prepare_state
...
Simplify Altair "genesis"
2021-04-27 12:32:13 -06:00
Danny Ryan
6031417444
Merge pull request #2301 from ethereum/fix-bouncing-attack-tests
...
Fix bouncing attack tests
2021-04-27 07:51:46 -06:00
Alex Stokes
b0aee5b271
Merge pull request #2346 from ethereum/pyspecdocs
...
update pyspec dev usage docs, improve makefile
2021-04-22 08:30:44 -07:00
Hsiao-Wei Wang
2063c96c80
Merge branch 'dev' into prepare_state
2021-04-21 16:34:29 +08:00
protolambda
c99d72d541
update pyspec dev usage docs, improve makefile
2021-04-21 03:28:22 +02:00
Danny Ryan
1694cdbd02
add always_bls for historical batch sanity test
2021-04-20 13:40:25 -06:00
Hsiao-Wei Wang
66e1a2858f
Use `ALTAIR_FORK_EPOCH` instead of `ALTAIR_FORK_SLOT`
2021-04-21 00:24:44 +08:00
Danny Ryan
c8bbc7dc97
Merge pull request #2334 from ethereum/committee-test
...
add committee progress tests for non genesis case
2021-04-20 08:39:25 -05:00
Danny Ryan
55f2cc6e41
address @ralexstokes PR comments
2021-04-16 11:42:26 -05:00
Danny Ryan
7167c5a9d9
generate sync committee update tests with always_bls
2021-04-16 11:32:27 -05:00
Hsiao-Wei Wang
1961831348
Merge branch 'dev' into prepare_state
2021-04-16 11:36:02 +08:00
Danny Ryan
81a83898cf
add committee progress tests for non genesis case
2021-04-15 12:19:51 -05:00
Hsiao-Wei Wang
26f54d6f22
Remove `CONFIG_NAME` from the config files. And add it back to pyspec context for testing
2021-04-15 15:49:29 +08:00
Hsiao-Wei Wang
bb63af53c9
Refactor genesis.py
2021-04-15 15:40:38 +08:00
Hsiao-Wei Wang
62c828bd4b
Merge branch 'dev' into prepare_state
2021-04-13 20:50:13 +08:00
Danny Ryan
1235e58a8d
Merge pull request #2325 from ethereum/pyspec-constants
...
Refactor pyspec `context.py` by adding `typing.py` and `constants.py`
2021-04-13 06:02:25 -05:00
Alex Stokes
18fc7c0498
Merge pull request #2311 from ralexstokes/add-altair-val-tests
...
Add some basic tests for Altair validator guide
2021-04-12 15:19:44 -07:00
Hsiao-Wei Wang
cd43d64809
Move constants to `eth2spec.test.helpers.constants`
2021-04-12 22:34:00 +08:00
Hsiao-Wei Wang
a8160f1634
Try to initialize state with pure Altair spec in tests
2021-04-10 00:53:37 +08:00
Alex Stokes
66905f4fa6
update test to work for both minimal and mainnet config
2021-04-08 18:25:58 -07:00
Alex Stokes
e4e65295b6
modify assignment test when sync committee size >= validator count
2021-04-08 18:00:58 -07:00
Alex Stokes
3fd4974430
iterate over the correct number of subcommittees
2021-04-08 17:44:54 -07:00
Alex Stokes
749b49898a
file reorg
2021-04-08 17:44:54 -07:00
Alex Stokes
4678ffc794
Update tests/core/pyspec/eth2spec/test/altair/validator/test_validator.py
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-04-08 17:44:53 -07:00
Alex Stokes
5e43ad69cf
Add some basic tests for Altair validator guide
2021-04-08 17:44:53 -07:00
Hsiao-Wei Wang
6e8b4b3ea9
Add eth2spec.merge.spec
2021-04-08 05:57:16 +08:00
Danny Ryan
20b465e788
bump VERSION.txt to 1.1.0-alpha.3
2021-04-05 18:07:59 -06:00
Aditya Asgaonkar
9e5ee0a083
Remove unnecesssary change
2021-04-03 17:43:18 -07:00
Aditya Asgaonkar
5194dd123c
TIL fictitious
2021-04-03 17:26:12 -07:00
Aditya Asgaonkar
9ec252e6f2
Fix linter
2021-04-03 17:22:33 -07:00
Aditya Asgaonkar
6e6afac86f
Remove unnecessary asserts
2021-04-03 17:17:43 -07:00
Aditya Asgaonkar
21b878364a
Fix checkpoint hierarchy consistency in tests
2021-04-03 17:09:08 -07:00
Aditya Asgaonkar
2478e1526a
Fix block hierarchy consistency in tests
2021-04-03 16:50:43 -07:00
Aditya Asgaonkar
9eb662786a
Add consistency checks in on_block tests
2021-04-01 06:33:37 -07:00
Hsiao-Wei Wang
2def461298
Merge branch 'dev' into altair_incentives
2021-03-31 00:53:58 +08:00
protolambda
d28cac0e8f
clean up test phase 1 testgen references
2021-03-29 15:38:43 +02:00
protolambda
2bc3e814b0
rename to custody game
2021-03-27 01:58:39 +01:00
protolambda
0c94be4204
clean up more phase1 test references
2021-03-27 00:14:32 +01:00
protolambda
a6c01f8212
no phase1 in tests, per-feature testing now, executable specs will be re-enabled per feature
2021-03-26 23:21:36 +01:00
protolambda
906cde0610
preserve proof of custody tests
2021-03-26 23:10:56 +01:00
protolambda
14cb996613
split phase1 tests into proof-of-custody and sharding tests, drop old shard-transition specific tests
2021-03-26 23:01:24 +01:00
Danny Ryan
d773c6ae9e
lint from pr
2021-03-26 08:28:34 -06:00
Barnabé Monnot
d1c9b8bade
Fix variable name
2021-03-26 19:03:12 +08:00
Barnabé Monnot
582965fd0b
Deprecate PROPOSER_REWARD_QUOTIENT from tests
2021-03-26 18:57:02 +08:00
Barnabé Monnot
71d03a411c
Scale up weights; use existing constants and new PROPOSER_WEIGHT
2021-03-26 18:36:49 +08:00
Barnabé Monnot
59134fb0ae
Modify incentives to preserve invariant
2021-03-26 12:18:51 +08:00
Danny Ryan
6c0a0ab3f2
patch test_filtered_block_tree test generator based on @ajsutton report
2021-03-24 12:57:14 -06:00
Danny Ryan
3a5f0e994a
Merge pull request #2253 from ethereum/master
...
backport generator fixes to dev
2021-03-22 11:11:10 -06:00
Danny Ryan
3374784bd3
Merge pull request #2261 from ethereum/altair-test-format-fix
...
Altair tests - fix mixed up formats
2021-03-22 11:10:56 -06:00
protolambda
4dd855667a
fix mixed up formats. Output slots as ints, output genesis eth1 init data as yaml dict
2021-03-22 02:50:05 +01:00
protolambda
4a82a375ae
avoid altair fork version collision, update test prep, fix genesis state creator bug
2021-03-21 22:07:28 +01:00
Danny Ryan
1707978189
fix v1.1.0-alpha.1 generators
2021-03-17 10:32:23 -06:00
Danny Ryan
e2c9a15aaf
Merge pull request #2246 from ethereum/sync_rewards
...
refactor sync committee rewards
2021-03-16 20:27:04 -06:00
Danny Ryan
7e1f7c392e
bump version.txt to 1.1.0-alpha.1
2021-03-16 20:03:19 -06:00
Hsiao-Wei Wang
2ee559eca1
Fix `SkippedTest` cases. Should remove the folder
2021-03-17 02:40:59 +08:00
Danny Ryan
b0a9fc8277
clean up and extend sync committee rewards tests
2021-03-16 11:18:26 -06:00
Hsiao-Wei Wang
d3c9eacd14
Disable MAINNET test_valid_signature_future_committee
2021-03-17 00:28:12 +08:00
Hsiao-Wei Wang
c9de95541f
Use a dummy `INCOMPLETE` file to indicate that the test generation is incomplete
2021-03-17 00:28:09 +08:00
Justin Drake
27e88a2484
(WIP) refactor sync committee rewards
2021-03-16 15:30:25 +00:00
Danny Ryan
0a97f65729
Merge pull request #2243 from ethereum/fix-altair-gens
...
fix altair test generators
2021-03-16 08:26:29 -06:00
Danny Ryan
85d323c227
Merge pull request #2242 from ethereum/sync_aggregate
...
Define SyncAggregate to bundle sync committee bits and signature
2021-03-15 15:48:20 -06:00
protolambda
1eaa3c1742
Define SyncAggregate to bundle sync committee bits and signature, update tests to better isolate the state-change, introduce helper function for future tests, and update test doc
2021-03-15 21:55:36 +01:00
Danny Ryan
06eed71856
fix altair test generators
2021-03-15 13:10:19 -06:00
Danny Ryan
4afb6533a2
suffix ALTAIR on update constants
2021-03-15 11:46:53 -06:00
Hsiao-Wei Wang
64dbcdce35
Use @with_all_phases
2021-03-16 01:10:18 +08:00
Hsiao-Wei Wang
734863a6d6
Skip mainnet genesis tests
2021-03-16 00:46:57 +08:00
Hsiao-Wei Wang
1a4bbdfd79
Disable `test_sync_committees_progress` + mainnet config
2021-03-16 00:16:27 +08:00
Hsiao-Wei Wang
d590eebd36
`SpecLightclient` -> `SpecAltair`
2021-03-16 00:00:08 +08:00
Hsiao-Wei Wang
78211a3649
Enable Altair genesis tests
2021-03-16 00:00:04 +08:00
Danny Ryan
b8bf7f0f80
Merge pull request #2236 from ethereum/justin_altair_cleanups
...
Altair cosmetic cleanups plus a couple substantive changes
2021-03-15 08:57:35 -06:00
Justin Drake
8e815dd3f7
revert rename of to
2021-03-15 11:25:59 +00:00
Justin Drake
5a16f99302
Fix line too long
2021-03-15 11:21:05 +00:00
Justin Drake
e7ebd08d69
Altair cosmetic cleanups plus a couple substantive changes
2021-03-15 11:08:41 +00:00
Hsiao-Wei Wang
1c0238075e
Fix some leftover from #2097
2021-03-13 12:42:51 +08:00
Hsiao-Wei Wang
5dcc9927c8
Merge pull request #2202 from ethereum/fork-choice-test-vectors
...
fork-choice test vectors: starting with `get_head` tests
2021-03-13 12:08:33 +08:00
Hsiao-Wei Wang
e77ba91821
Apply proto's feedback, fix+refactor test_get_head, fix test format doc
...
Note that to execute on_attestation after on_block
Output more checking field
Disable mainnet config test_filtered_block_tree
Fix after rectoring + use more run_on_block
Fix and refactor `tick_and_run_on_attestation`
2021-03-13 00:29:35 +08:00
Danny Ryan
65dcf897c2
Merge pull request #2147 from ethereum/lightclient-sync-exe
...
Make `sync-protocol.md` pass the linter and add basic tests
2021-03-12 07:52:45 -07:00
Hsiao-Wei Wang
d29926efe6
Remove the duplicate get_head unit test
2021-03-12 21:05:23 +08:00
Hsiao-Wei Wang
a1e74b2c18
Fix conflicts
2021-03-12 01:05:26 +08:00
Hsiao-Wei Wang
c34eae33d0
Merge branch 'dev' into lightclient-sync-exe
2021-03-12 00:49:29 +08:00
Hsiao-Wei Wang
216bbb0a46
Merge branch 'dev' into fork-choice-test-vectors
2021-03-12 00:34:23 +08:00
Danny Ryan
79f351cfca
Merge branch 'dev' into leak-scores
2021-03-11 09:28:58 -07:00
Hsiao-Wei Wang
96e29841a7
Merge branch 'dev' into fork-choice-test-vectors
2021-03-11 23:45:54 +08:00
Hsiao-Wei Wang
72832c8b9c
Fix test
2021-03-11 22:25:48 +08:00
Hsiao-Wei Wang
b44e576e95
LIGHTCLIENT_PATCH/HF1 -> ALTAIR
2021-03-11 21:32:00 +08:00
Hsiao-Wei Wang
69489d1541
Rename folders and file names to `altair`
2021-03-11 21:12:46 +08:00
Hsiao-Wei Wang
2de64cbda1
Add `process_light_client_update` tests
2021-03-11 21:06:58 +08:00
Danny Ryan
813608928c
Merge branch 'dev' into tests-compression
2021-03-10 16:43:02 -07:00
Danny Ryan
36b6f8c3bf
Merge branch 'dev' into lightclient-sync-exe
2021-03-10 16:25:01 -07:00
Danny Ryan
cc191a0e2c
Merge branch 'dev' into leak-scores
2021-03-10 13:18:58 -07:00
Danny Ryan
37c49ffcdc
ensure rewards are tested properly post altair fork
2021-03-10 13:11:03 -07:00
Danny Ryan
1f3e73703c
use 'other_phases' for fork tests
2021-03-10 12:52:35 -07:00
Danny Ryan
e792c27c91
@hwwhww review
...
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-03-10 12:27:50 -07:00
Danny Ryan
f9b54ea03b
remove fork_test
2021-03-09 16:18:30 -07:00
Danny Ryan
956a7a2ef1
Update tests/core/pyspec/eth2spec/test/context.py
2021-03-09 16:09:08 -07:00
Danny Ryan
e2abdb74ae
port testing
2021-03-09 15:41:28 -07:00
Hsiao-Wei Wang
f025ec40c5
Fix linter error
2021-03-09 21:21:32 +08:00
Hsiao-Wei Wang
7a10c7108a
Fix decorator calls
2021-03-09 21:21:10 +08:00
Hsiao-Wei Wang
f97ea9e172
Generate basic tests. Still having problem with generating `with_custom_state` tests
2021-03-09 20:55:39 +08:00
Hsiao-Wei Wang
50fb3da072
Make test_fork.py truly pass
2021-03-09 20:54:48 +08:00
Danny Ryan
6c406753f1
working through test gens
2021-03-08 19:11:31 -07:00
Danny Ryan
d6961f636d
add base hf1 fork function tests
2021-03-08 17:21:01 -07:00
Danny Ryan
deace8768e
port @justindrake's general cleanups from #2212
2021-03-01 19:41:28 -07:00
Danny Ryan
63e014791c
Merge branch 'dev' into dev-merge
2021-02-24 16:23:04 -07:00
Danny Ryan
fb974ed37f
bump version to 1.0.1
2021-02-23 16:40:19 -07:00
Danny Ryan
7af50cc827
add eth1 withdrawal credentials to spec
2021-02-23 16:16:35 -07:00
Danny Ryan
e35b850181
Merge pull request #2198 from ethereum/hf1-config
...
update penalty config values for hf1
2021-02-22 18:26:43 -06:00
Danny Ryan
6df3de8506
Merge pull request #2199 from ethereum/turn_off_phase1_testgen
...
[testgen] turn off phase 1, turn on HF1, and refactoring
2021-02-22 13:28:19 -06:00
Hsiao-Wei Wang
de4cad5d35
Update docs
2021-02-22 18:40:04 +08:00
Hsiao-Wei Wang
27507fb3e2
Add `get_head` test vectors
2021-02-19 13:08:35 +08:00
Hsiao-Wei Wang
e58dcb40ac
Clean up and kick the cache
2021-02-18 17:51:01 +08:00
Hsiao-Wei Wang
9cc8567d68
Move `gen_helpers` into a module of `eth2spec` package
2021-02-18 15:17:47 +08:00
Danny Ryan
8ec082fcf9
Merge pull request #2149 from ethereum/0x01-creds
...
Eth1 withdrawal credentials (0x01)
2021-02-16 13:06:34 -06:00
Hsiao-Wei Wang
600a4daddf
Turn off phase1 testgen and turn on lightclient_patch testgen
2021-02-15 22:29:27 +08:00
Hsiao-Wei Wang
dda7010c0c
Fix the tests that use `MIN_SLASHING_PENALTY_QUOTIENT`. (The mainnet tests failed before this fix)
2021-02-13 23:02:06 +08:00
Hsiao-Wei Wang
24a244eb9b
Fix typo: `get_slashing_multipler` -> `get_slashing_multiplier`
2021-02-13 22:48:34 +08:00
Danny Ryan
2b8b0d9e2b
update penalty config values for hf1
2021-02-11 15:55:43 -07:00
Danny Ryan
34cea67b91
ValidatorFlags -> ValidatorFlag
2021-02-04 08:45:25 -07:00
Danny Ryan
1c1ba5cba2
minor PR feedback
2021-02-02 12:35:00 -07:00
protolambda
e865670111
add missing decorators for testruns in no-bls mode
2021-02-01 21:47:00 +01:00
protolambda
3677073812
bitvector[8] -> uint8, for efficient packing in flags merkle tree
2021-02-01 21:46:27 +01:00
Danny Ryan
1ba4917119
add process_attestation tests to cover various timing and correctness scenarios
2021-02-01 08:35:58 -07:00
Danny Ryan
b029c75d88
must be correct target to get correct head
2021-02-01 07:52:06 -07:00
Danny Ryan
ad01c85ff6
minor reorder to process_epoch calls
2021-02-01 07:06:29 -07:00
Hsiao-Wei Wang
6ce4b1b0e7
Fix tests
2021-01-29 10:39:13 -07:00
Danny Ryan
46848e4202
Merge branch 'dev' into accounting-reform
2021-01-29 08:49:51 -07:00
Hsiao-Wei Wang
1b00c10ed3
Apply @michaelsproul's feedback
2021-01-27 14:47:52 +08:00
Hsiao-Wei Wang
ae218015b7
Merge branch 'dev' into re_process_final_updates_fix
2021-01-27 03:02:24 +08:00
Hsiao-Wei Wang
15e48f712b
Fix Phase 1 epoch_processing and fix epoch_processing testgen
2021-01-27 03:02:12 +08:00
Hsiao-Wei Wang
1e7c33810f
Merge pull request #2189 from ralexstokes/duplicate-sync-committee-patch
...
test refactor to use helper for duplicates in light client committees
2021-01-22 09:55:52 +08:00
Alex Stokes
0e415fe7c7
comments no longer apply
2021-01-21 15:39:04 -08:00
Alex Stokes
3847e425b1
refactor to use helper for duplicates in light client committees, rather than config changes
2021-01-21 15:39:04 -08:00
Hsiao-Wei Wang
17a04c2728
PR feedback from @ralexstokes
2021-01-21 23:03:44 +08:00
Hsiao-Wei Wang
93d19bdf40
Update and add tests
2021-01-19 22:03:01 +08:00
Hsiao-Wei Wang
c5d9aa2502
Fix test cases for minimal and mainnet configs
2021-01-19 20:00:43 +08:00
Hsiao-Wei Wang
2a6699290f
Revert "Fix SyncCommittee"
...
This reverts commit b2658f1091
.
2021-01-14 01:47:40 +08:00
Hsiao-Wei Wang
b2658f1091
Fix SyncCommittee
...
1. Make `get_sync_committee_indices` do not return duplicate indices
2. Pad default values to Vectors
2021-01-13 20:12:52 +08:00
Hsiao-Wei Wang
a340f30e61
Merge branch 'dev' into accounting-reform
2021-01-13 14:44:17 +08:00
Hsiao-Wei Wang
252c331255
Fix existing tests on #2176 (accounting reform) ( #2180 )
...
* Fixing tests
* Add `is_post_lightclient_patch` helper to determine the fork version condition
2021-01-13 14:29:18 +08:00
Alex Stokes
e518c4d04d
update test to use fresh sync committees
...
the way the test infra is built we end up with
two identical sync committees at epoch 0.
2021-01-12 09:31:07 -08:00
Alex Stokes
5001588285
Add additional sync committee tests
2021-01-07 12:53:16 -08:00
Alex Stokes
ac6dbd1c35
Add sync committee test for signature over incorrect block
2021-01-07 11:28:21 -08:00
Alex Stokes
61d141b4db
Use more clear names for tests
2021-01-07 10:57:54 -08:00
Alex Stokes
1a3fefcc93
Refactor epoch processing test helpers
2021-01-07 10:55:51 -08:00
Alex Stokes
049075b44a
Refactor sync committee helpers
2021-01-07 10:42:21 -08:00
Alex Stokes
7e82b54131
Update tests/core/pyspec/eth2spec/test/lightclient_patch/block_processing/test_process_sync_committee.py
...
Add clarifying comment
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-01-07 09:45:20 -08:00
Alex Stokes
cc7ae4abd0
Add test for sync committee block rewards
2021-01-06 10:25:55 -08:00
Alex Stokes
547cb0f38f
Add epoch processing test for sync committee updates
2021-01-06 09:45:17 -08:00
Alex Stokes
781f344409
Add test for invalid sync committee signature
2021-01-06 09:45:17 -08:00
Alex Stokes
955a01c49b
Add basic test for invalid sync committee bits
2021-01-06 09:45:17 -08:00
Alex Stokes
b94af435da
Refactor helpers into separate module
2021-01-06 09:45:17 -08:00
Hsiao-Wei Wang
9c75c3819d
Fix `previous_epoch_participation` and `current_epoch_participation` initialization
2021-01-06 02:09:39 +08:00
Alex Stokes
71c5eb5c2f
Update names in pyspec README
...
Names for pip categories have been updated
2020-12-18 11:11:44 -08:00
Danny Ryan
89c5ca6bcd
'light_client' -> 'sync_committee'
2020-12-17 06:30:36 -07:00
Danny Ryan
cc9a4cdc46
add base sanity light client tests
2020-12-16 17:14:42 -07:00
Hsiao-Wei Wang
d01a4ad823
Fix depth calculation...again(!) and add unittests
2020-12-16 15:01:22 +08:00
Hsiao-Wei Wang
bcde37c39f
Make `sync-protocol.md` pass the linter
2020-12-15 13:24:43 +08:00
Hsiao-Wei Wang
acfe49e3f3
executable light client patch: beacon-chain.md ( #2141 )
...
* Bump remerkleable to 0.1.18
* Disable `sync-protocol.md` for now. Make linter pass
* Enable lightclient tests
* Use *new* `optional_fast_aggregate_verify`
* Fix ToC and codespell
* Do not run phase1 tests with Lightclient patch
* Fix the Eth1Data casting bug. Add a workaround.
* Fix `run_on_attestation` testing helper
* Revert
* Rename `optional_fast_aggregate_verify` to `eth2_fast_aggregate_verify`
* Apply Proto's suggestion
* Apply Danny's suggestion
* Fixing tests
* Fix after rebasing
* Rename `LIGHTCLIENT` -> `LIGHTCLIENT_PATCH`
* New doctoc
* Add lightclient patch configs
* fix gitignore light client patch generator output
* Upgrade state for light client patch
* Add `lightclient-fork.md` to deal the fork boundary and fix
`process_block_header`
* Misc cleanups
1) Add a summary note for every function that is changed.
2) Avoid changing `process_block` (instead only change `process_block_header`).
3) Rename `G2_INFINITY_POINT_SIG` to `G2_POINT_AT_INFINITY` to avoid `SIG` contraction.
4) Misc cleanups
* Update block.py
* Update beacon-chain.md
* Fix typo "minimal" -> "mainnet"
Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>
* Use the new `BeaconBlockHeader` instead of phase 0 version
* Update config files
* Move `sync_committee_bits` and `sync_committee_signature` back to `BeaconBlockBody`
Co-authored-by: protolambda <proto@protolambda.com>
Co-authored-by: Justin <drakefjustin@gmail.com>
Co-authored-by: Marin Petrunić <mpetrunic@users.noreply.github.com>
2020-12-15 13:18:20 +08:00
Danny Ryan
6b728c1880
add eth1 withdrawal credentials to spec
2020-12-11 15:03:58 -07:00
Danny Ryan
226f1d4dfc
fix multi-operation test runner helper
2020-11-06 07:05:52 -06:00
Danny Ryan
7589af8e8d
remove wip notice on phase 0 specs
2020-11-04 09:30:29 -06:00
Danny Ryan
15270b7933
bump VERSION.txt to 1.0.0
2020-11-03 17:15:36 -06:00
Danny Ryan
276ca6d4d3
pr feedback
...
Co-authored-by: Diederik Loerakker <proto@protolambda.com>
2020-11-03 16:27:47 -06:00
Danny Ryan
a8c1d21589
add attestation test for off by one committee index
2020-11-03 15:49:34 -06:00