Commit Graph

151 Commits

Author SHA1 Message Date
Mikhail Kalinin 199d6aee58 Merge remote-tracking branch 'origin/dev' into randao_in_execution_payload 2021-06-19 00:28:38 +06: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
Mikhail Kalinin cc20b80103 Fix linter, add more test helpers 2021-06-15 14:55:06 +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
Mikhail Kalinin 6350e27366 Add difficulty field to PowBlock 2021-06-08 17:56:07 +06:00
Danny Ryan 8ba740a93a
Merge branch 'dev' into invariant-checks 2021-06-07 08:12:27 -06:00
Danny Ryan 30f2a07637
Merge pull request #2438 from ralexstokes/add-aggregate-pks-fn
Move BLS extensions to new file in Altair
2021-06-07 07:18:31 -06:00
Hsiao-Wei Wang 049c18b6c4
Bump mypy to v0.812 (latest) 2021-06-03 20:49:29 +08:00
Hsiao-Wei Wang 989d33f6ec
Bump mypy to v0.800. This release adds Python 3.9 support. 2021-06-03 17:30:43 +08:00
Mikhail Kalinin 6226be9e1e Implement TransitionStore and transition total difficulty computation 2021-06-01 16:28:30 +06:00
Mikhail Kalinin fd4369dc7c Add merge/fork.md with upgrade_to_merge definition 2021-05-31 19:30:54 +06:00
protolambda 8f005c18e5
when an untyped var is not the last config var, it needs a comma 2021-05-31 15:20:50 +02:00
protolambda d11586122f
update remerkleable, union support 2021-05-28 01:02:08 +02:00
Alex Stokes 6ecbc5e357
Add new file to spec infra 2021-05-27 12:21:04 -07:00
Alex Stokes 7a14e93c65
PR feedback 2021-05-27 12:02:44 -07:00
Hsiao-Wei Wang 69f2a31406
Add some config invariant checks 2021-05-26 01:10:40 +08:00
Hsiao-Wei Wang 74761db7a3
Fix lint error 2021-05-25 21:40:10 +08:00
Hsiao-Wei Wang fc1af1cff3
[pyspec] Use mainnet.py as the default spec 2021-05-25 21:13:12 +08:00
Alex Stokes 41ca149429
Explicitly define `bls.AggregatePKs` 2021-05-24 11:56:10 -07:00
protolambda 1636a1df58
reduce duplicate combination code, and no in-place updates 2021-05-19 19:18:42 +02:00
protolambda 291168e1e3
clarify config/preset separation, address review comments by @djrtwo 2021-05-19 17:15:34 +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 ccc6679e21
config as dataclass 2021-05-18 12:48:42 +02:00
protolambda 6f68913e11
implement pyspec build targets 2021-05-18 12:12:01 +02:00
protolambda 79d0fa037f
updated config util 2021-05-18 09:55:25 +02:00
Danny Ryan 4cd9a6c710
Merge pull request #2385 from ethereum/execution-payload-testing
Execution payload tests
2021-05-14 06:40:40 -06:00
protolambda 0390ab819a
Protocols pyspec support + execution payload tests cleanup 2021-05-12 02:40:23 +02: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
Danny Ryan 4b27b076f6
add missing comma 2021-05-06 12:36:08 -06:00
Alex Stokes 953b0278a1
whitespace 2021-05-06 10:52:48 -07: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 cc11328f74
fix merge forkchoice tests with mock get_pow_block 2021-05-05 16:26:41 +02:00
Alex Stokes 58e768392e
Simplify spec comment processing 2021-04-23 08:03:49 -07:00
Alex Stokes a9e3ecabbd
demo spec comment feature 2021-04-21 18:49:51 -07:00
Alex Stokes de3ac15d9c
introduce alternate spec parser with spec comments 2021-04-21 18:49:51 -07:00
Hsiao-Wei Wang f2df4bf5c8
Merge branch 'dev' into refactor-spec-builder2 2021-04-19 23:14:30 +08:00
Sam.An 9e4f5c1879
changed alphabet string to string module.
changed alphabet string to string module.
2021-04-19 22:41:45 +09:00
Hsiao-Wei Wang 5349645a8f
Rename `SpecAdjustment` to `SpecBuilder` and add `build_spec` interface 2021-04-16 11:29:10 +08:00
Hsiao-Wei Wang e8c3d28a86
Merge branch 'dev' into refactor-spec-builder2 2021-04-16 11:03:57 +08:00
Danny Ryan 2ac19be198
Merge pull request #2331 from BenSchZA/BenSchZA-patch-1
Update variable name ALTAIR_INVAIANT_CHECKS to INVARIANT in `setup.py`
2021-04-15 07:20:14 -05:00
Danny Ryan 2baeee463d
Merge pull request #2322 from mkalinin/merge-cleanup
Merge cleanups and improvements
2021-04-15 07:17:55 -05:00
BenSchZA 35fea7a11b Update copy INVAIANT to INVARIANT 2021-04-14 21:37:25 +02:00
Danny Ryan 320172fb08
fix lint 2021-04-14 08:02:09 -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
Alex Stokes 4bf6331c21
update remerkleable 2021-04-12 15:11:21 -07:00
Hsiao-Wei Wang 79230c5f68
Update pyspec builder 2021-04-10 03:04:27 +08:00