Commit Graph

256 Commits

Author SHA1 Message Date
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 7f70a7704b
fix validator state during deposit randomization 2021-08-19 07:43:15 -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 817d2ee7bf
Refactor sync committee tests so rewards are verified for all test cases 2021-08-18 10:49:43 -06: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
Alex Stokes 2ff143c719
Add test for exited validators during inactivity leak 2021-08-04 16:28:42 -07: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
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
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
Danny Ryan 48382ce09c
extend inactivity updates tests 2021-07-07 12:20:34 -06:00
Alex Stokes 21aaab5a1e
add test for sync aggregate with bad domain in signature 2021-07-01 17:30:40 -07:00
Hsiao-Wei Wang 29a93f6285
Move more unit tests to test vectors 2021-06-30 04:55:41 +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 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
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 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 cfc66a3794
patch tests 2021-06-07 16:36:18 -06:00
Danny Ryan 8ba740a93a
Merge branch 'dev' into invariant-checks 2021-06-07 08:12:27 -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 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
Mikhail Kalinin fd4369dc7c Add merge/fork.md with upgrade_to_merge definition 2021-05-31 19:30:54 +06: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
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
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
Alex Stokes 0ec1ec77b8
Expose attestation helper in pyspec tests 2021-05-18 17:25:51 -07: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 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 d3bf218361
update config usages 2021-05-18 12:56:34 +02:00