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
Hsiao-Wei Wang
844c879f1c
Bump `py_ecc` and `milagro_bls_binding` ( #2169 )
...
* Bump py_ecc to v5.1.0 and milagro_bls_binding to v1.6.2
* python3.8 -> python3 for py39 compatibility
* fix
* Try python:3.9
* Revert: using Python3.8 in CI now
2021-01-05 21:00:52 +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
Danny Ryan
f7a9493ca0
multi-op tests
2020-10-20 17:00:16 -06:00
Danny Ryan
a34970f8a3
move op tests to test_blocks
2020-10-16 08:27:28 -06:00
Danny Ryan
aab58e4700
update sanity generators to generate the oepration block tests as well
2020-10-14 17:41:11 -06:00
Danny Ryan
c17a95a175
add note about how slashings and exits can interact. add test
2020-10-14 17:33:14 -06:00
Danny Ryan
a61c56a6b6
add a few rewards tests for duplicate style attestations
2020-10-13 16:15:35 -06:00
Danny Ryan
17829836f6
Merge pull request #2099 from ethereum/fix_bls_testgen_typo
...
Fix BLS testgen typo
2020-10-13 08:08:20 -06:00
Hsiao-Wei Wang
d6ccbd515d
Fix typo, `messages` -> `message`
2020-10-13 11:39:10 +08:00
protolambda
3fb9b15551
remove unused imports
2020-10-08 21:17:13 +02:00
protolambda
8bbc5f7fc3
update test format docs
2020-10-08 21:02:18 +02:00
protolambda
4c90c357b7
remove yaml duplicates, compress SSZ test outputs
2020-10-08 20:34:59 +02:00
Danny Ryan
2e09c91e39
fix test generators for mainnet max slashing penalties
2020-10-06 11:34:33 -06:00
Hsiao-Wei Wang
00a19e583e
Bump milagro_bls_binding to 1.5.0
2020-10-06 16:17:29 +08:00
Hsiao-Wei Wang
d264ad8af7
Merge pull request #2080 from ethereum/bls_v4
...
Bump IETF BLS spec version draft 03 -> draft 04
2020-10-05 22:12:52 +08:00
Hsiao-Wei Wang
4d3ac72473
Bump milagro_bls_binding to `1.4.0`, handle the exception cases
2020-10-05 21:55:49 +08:00
Hsiao-Wei Wang
4613c6b333
Bump py_ecc to 5.0.0
2020-10-01 00:44:47 +08:00
Danny Ryan
9f36fd6954
PR feedback. thanks @hwwhww
2020-09-29 10:02:28 -06:00
Danny Ryan
0e2e494d7e
fix function signature calls on deposit helpers
2020-09-28 20:25:24 -06:00
Danny Ryan
76d69263fc
use better rng practice for reproducibility
2020-09-28 18:26:03 -06:00
Danny Ryan
4e2c7d20b7
add additional genesis initialization tests
2020-09-28 17:55:54 -06:00
Danny Ryan
157f7e8ef4
upgrade config to mainnet values
2020-09-28 12:56:08 -06:00
Hsiao-Wei Wang
b43f62de0e
Fix encoding
2020-09-25 15:05:10 +08:00
Hsiao-Wei Wang
ad4ad2d8b4
Bump IETF BLS spec version draft 03 -> draft 04
2020-09-25 15:01:41 +08:00
Hsiao-Wei Wang
bdbd2aae37
Aggregate G2 point at infinity
2020-09-25 15:01:41 +08:00
Hsiao-Wei Wang
19d6c8336a
Add IETF BLS draft 04 edge cases test vectors
2020-09-25 15:01:38 +08:00
Danny Ryan
4c9f5eee71
re-enable mainnet ssz_static tests
2020-09-21 13:40:14 -06:00
Danny Ryan
68bcc19e09
Merge pull request #1957 from ethereum/testgenphase1
...
Enable test generation for phase1
2020-09-18 08:44:38 -06:00
Danny Ryan
d257926e3a
remove kludge to skip large_validator_set on mainnet config
2020-09-18 07:59:25 -06:00
Hsiao-Wei Wang
27d8c80690
Use `with_configs[MINIMAL]` on `large_validator_set` tests
2020-09-18 17:05:30 +08:00
Danny Ryan
0c1784b8b5
skip large_validator_set tests if too large
2020-09-17 16:50:59 -06:00
Danny Ryan
92d4a063c1
bump VERSION.txt to 0.12.3
2020-09-17 12:14:17 -06:00
Hsiao-Wei Wang
5374890da0
Merge branch 'dev' into testgenphase1
2020-09-17 21:11:49 +08:00
Danny Ryan
7c685d490e
Merge pull request #2061 from ethereum/anchor_block_header_3
...
Pass `anchor_block` to `get_forkchoice_store`
2020-09-15 10:10:29 -06:00
Hsiao-Wei Wang
1e29563242
Pass `anchor_block` to `get_forkchoice_store`
2020-09-15 12:51:11 +08:00
Hsiao-Wei Wang
20bd00cef0
Add `make lint_generators` linter check for test generators
2020-09-15 11:19:50 +08:00
Hsiao-Wei Wang
c0c2461d2f
Remove redundant keys and use Dict for `phase_0_mods`, `phase_1_mods` instead of List
2020-09-15 11:13:33 +08:00
Danny Ryan
1785f987f8
add a few more proposer slashing tests
2020-09-10 16:50:03 -06:00
protolambda
28137a6176
Merge branch 'dev' into testgenphase1
2020-09-09 23:43:26 +02:00
Hsiao-Wei Wang
fd4e7dde94
Fix `disable_process_reveal_deadlines` decorator: should have set it back to the spec function for other test cases afterwards
2020-09-07 13:44:12 +08:00
Hsiao-Wei Wang
916ae9e309
Enable more rewards and finality tests
2020-09-04 21:50:27 +08:00
Hsiao-Wei Wang
a0d646e1e0
Add decorators to diable testing with mainnet config
2020-09-04 21:50:21 +08:00
Hsiao-Wei Wang
74a2a1c0d4
Enable all tests
2020-09-04 02:40:36 +08:00
Hsiao-Wei Wang
dc888178be
Merge branch 'testgenphase1' into reveal_deadlines_setting
2020-09-02 00:07:19 +08:00
Hsiao-Wei Wang
b4583aba5d
Add skipping messages to some old test cases
2020-08-28 14:52:41 +08:00
Hsiao-Wei Wang
458166af83
Update the pytest version to >=4.4 as eth2spec
2020-08-27 16:12:31 +08:00
Hsiao-Wei Wang
42f368c45c
Disable `process_reveal_deadlines` in the custody tests that have `EPOCHS_PER_CUSTODY_PERIOD`-long transition
2020-08-25 13:46:29 +08:00
Hsiao-Wei Wang
7eeb754f7d
Add `disable_process_reveal_deadlines` decorator
2020-08-13 18:06:36 +08:00
Hsiao-Wei Wang
6289664260
Update testing context
...
1. Add `with_configs` decorator to assign available configs
2. Add `only_full_crosslink` decorator to detect if the configuation can
do full crosslinking
3. Add `context.is_pytest` flag: True if calling via pytest. False if
calling from test generator.
2020-08-12 21:50:14 +08:00
Hsiao-Wei Wang
83760b15ac
Use v-guide's `get_custody_secret`
2020-08-12 17:39:44 +08:00
Hsiao-Wei Wang
643611aa6d
Merge pull request #2010 from ethereum/fix-shard-count
...
Fix active shard count issues
2020-08-12 03:05:16 +08:00
Hsiao-Wei Wang
52ba90d719
Skip the testcases that don't support the fork or the config
2020-08-11 16:19:20 +08:00
Hsiao-Wei Wang
3e5cada5de
Merge branch 'dev' into testgenphase1
2020-08-11 15:24:43 +08:00
Hsiao-Wei Wang
7ce10dd210
Remove unused `get_attestation_custody_signature`
2020-08-11 12:48:13 +08:00
Danny Ryan
b02c2e1c49
fix randao mix in sanity tests
2020-08-10 21:00:23 -06:00
Danny Ryan
8b39d41145
PR feedback
2020-08-10 13:06:20 -06:00
Danny Ryan
76c96782e2
fix disable-bls default value
2020-08-10 12:58:57 -06:00
Danny Ryan
c3ae85387c
add larger validator set test for regression test for active_shard_count issue
2020-08-05 13:26:21 -06:00
Danny Ryan
56dbc17793
fix active shard count bugs
2020-08-05 12:44:31 -06:00
Hsiao-Wei Wang
6a9dd1647c
Merge branch 'dev' into shard-fork-choice-fix
2020-07-30 01:13:50 +08:00
Hsiao-Wei Wang
60e9eacf4b
Disable these 2 tests in phase 1 due to #1974 Issue 3
2020-07-30 00:22:27 +08:00
Hsiao-Wei Wang
e3bbf3c702
Merge branch 'dev' into shard-fork-choice-fix
2020-07-29 23:55:30 +08:00
Hsiao-Wei Wang
bd5346b624
Merge pull request #1989 from ethereum/enable-bls-citest
...
Enable Milagro BLS in CI
2020-07-29 23:54:53 +08:00
Hsiao-Wei Wang
b58633ce5d
Quick fix the phase 1 configurations and tests ( #1990 )
...
* Quick fix the configurations
* Remove the unused `CUSTODY_RESPONSE_DEADLINE`
2020-07-29 02:06:25 +08:00
Hsiao-Wei Wang
5d388f7b9b
Fix the conflict of #1971
2020-07-29 02:03:52 +08:00
Hsiao-Wei Wang
f6fd151872
Merge branch 'dev' into shard-fork-choice-fix
2020-07-29 00:15:41 +08:00
Hsiao-Wei Wang
b1eb157539
Merge branch 'dev' into hwwhww/phase-1-fork-slot
2020-07-28 23:59:19 +08:00
Hsiao-Wei Wang
a8370f7448
Apply refactoring suggestions from Danny
2020-07-28 21:51:00 +08:00
Danny Ryan
cf1a9e815d
Merge pull request #1991 from ethereum/reorg-tests
...
Reorg tests and add finality test suite
2020-07-24 08:13:54 -06:00
protolambda
fbb8401d03
sanity test: proposer slashes themselves
2020-07-24 15:09:20 +02:00
protolambda
951c552ecc
remove second hash cache, type as Bytes32
2020-07-24 02:11:48 +02:00
protolambda
e9d887be4d
Enable BLS in finality tests, use Milagro
2020-07-24 01:19:14 +02:00
Hsiao-Wei Wang
64aed78d6a
Only one test format for finality tests. No extra `finality.md` here
2020-07-24 05:25:17 +08:00
Hsiao-Wei Wang
b4c91efdbc
Add __init__.py
2020-07-24 04:25:53 +08:00
Hsiao-Wei Wang
de15960185
Add finality tests to test vectors
2020-07-24 04:23:26 +08:00
Hsiao-Wei Wang
bdde2e5889
Reorg test dir
2020-07-24 03:54:45 +08:00
Hsiao-Wei Wang
e7f070d525
Use `hash_tree_root` to generate `ShardBlockHeader.body_root`
...
Include the mix-in length to the proof.
2020-07-24 02:09:25 +08:00
Danny Ryan
0692ac0172
bump VERSION.txt to 0.12.2
2020-07-23 10:28:02 -06:00
Hsiao-Wei Wang
33e56b5742
Apply Terence's suggestion: refactor on_shard_block interface
2020-07-22 22:48:52 +08:00
Danny Ryan
4c1a28e547
Merge pull request #1976 from ethereum/fix-bls-test-name
...
Rename `aggregate_na_pubkeys` to `aggregate_na_signatures` and add comments
2020-07-21 10:18:23 -06:00
Hsiao-Wei Wang
302607eac5
Rename `aggregate_na_pubkeys` to `aggregate_na_signatures` and add comments
2020-07-21 21:10:27 +08:00
Hsiao-Wei Wang
4dcf5e2498
Add test case of different shards
2020-07-17 14:24:11 +08:00
Hsiao-Wei Wang
0b81c967fa
Add notes
2020-07-17 00:46:25 +08:00
Hsiao-Wei Wang
8fb96f1860
Enable more phase 0 tests to be compatible with phase 1
2020-07-17 00:10:04 +08:00
Hsiao-Wei Wang
cf42fd4828
Rename `PHASE_1_GENESIS_SLOT` to `PHASE_1_FORK_SLOT` and set it to `Slot(0)` for testing.
2020-07-16 23:58:47 +08:00
Hsiao-Wei Wang
8e82ca5d1a
Merge branch 'dev' into hwwhww/new_int_to_bytes_dev
2020-07-16 01:36:19 +08:00
Hsiao-Wei Wang
6e3a7ad8f2
Merge branch 'dev' into hwwhww/strict-uint64-2
2020-07-15 23:02:51 +08:00
Hsiao-Wei Wang
f6b1fe6172
Refactor tests and avoiding passing `shart_store` to helper functions
2020-07-15 19:07:39 +08:00
Hsiao-Wei Wang
2da331a345
Rename `test_on_shard_head.py` to `test_on_shard_block.py`
2020-07-15 19:01:20 +08:00
Hsiao-Wei Wang
43ef9aa294
Make ShardLatestMessage per shard per validator
...
1. Add `ShardLatestMessage` dataclass
2. To make it compatible with phase 0 tests and APIs, add `Store.shard_stores: Dict[Shard, ShardStore]`
3. Update `get_forkchoice_store` and `update_latest_messages`
2020-07-14 17:44:01 +08:00
Hsiao-Wei Wang
60f4bd2288
The AttesterSlashing tests for phase1 can be enabled now after #1889
2020-07-09 21:59:01 +08:00
protolambda
3c374b1e16
Update test gen to output phase 1 test vectors. Mainnet disabled for now.
2020-07-07 21:26:35 +02:00
protolambda
6b1d4839d8
update block operations generator
2020-07-07 20:17:36 +02:00
Hsiao-Wei Wang
d608be72c3
Merge pull request #1937 from ethereum/hwwhww/custody-block-test
...
Fix `ShardTransition.shard_data_roots` and add custody game block-level tests
2020-07-02 13:24:07 +08:00
Hsiao-Wei Wang
a681163305
Merge pull request #1938 from ethereum/hwwhww/shard-block-tests-part2
...
Add more tests for `shard_state_transition`
2020-06-30 00:26:24 +08:00
Hsiao-Wei Wang
98a9facab6
PR feedback from Danny
...
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2020-06-30 00:16:00 +08:00
Danny Ryan
e06bbd14f7
Merge pull request #1907 from ethereum/fix_deprecated_merkle_util
...
Fix deprecated utility code, avoid wrong helper function name, add tests
2020-06-29 08:31:05 -06:00
Hsiao-Wei Wang
d3f2344e45
Add CustodySlashing block test and fix `get_attesting_indices` cache
2020-06-29 20:56:36 +08:00
Hsiao-Wei Wang
235175d937
Add `CustodyKeyReveal` and `EarlyDerivedSecretReveal` tests
2020-06-29 19:58:14 +08:00
Hsiao-Wei Wang
c871733bf3
Fix yield block
2020-06-29 19:48:07 +08:00
protolambda
3b7617f51a
make extracted byte uint8 for bitshift, do not use negative slice indexing, avoid negative comparison in test
2020-06-26 16:14:27 +02:00
protolambda
3fb0257cbb
update remerkleable for uint and mypy improvements
2020-06-26 15:57:53 +02:00