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