1173 Commits

Author SHA1 Message Date
Hsiao-Wei Wang
cbba5426fe
PR feedback 2021-10-14 20:22:03 +08:00
Hsiao-Wei Wang
9879e0475d
Add random test format doc 2021-10-14 00:27:08 +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
ac911558ac
Merge pull request #2655 from ethereum/bump-version
bump VERSION.txt to v1.1.2
2021-10-07 17:32:27 +03:00
Hsiao-Wei Wang
e821ddade2
Remove the trailing comma 2021-10-07 21:44:51 +08: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
7a7ab81306
Also update other generators so that we won't write the bad pattern again 2021-10-07 03:14:29 +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
Etan Kissling
41c12bfcb2
improve grammar in BLS test comments
The comments for the PRIVKEYS definition in the BLS test generator were
a bit difficult to read. Improved by rewording them slightly.
2021-09-22 14:15:07 +02: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