Commit Graph

61 Commits

Author SHA1 Message Date
protolambda 17fad2dea2
rebase The Merge onto Altair base functionality 2021-07-22 16:36:41 +02:00
Justin c8d22b1d91
fix minor cosmetic typo 2021-07-07 13:44:22 +01: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
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 2e87a6b44e Apply review comments 2021-06-11 22:50:11 +06:00
Mikhail Kalinin 95775e1b90 Add randao to execution payload 2021-06-11 16:05:19 +06:00
Mikhail Kalinin 5228dc814f Redefine initialize_beacon_state_from_eth1 2021-06-08 18:44:53 +06:00
Mikhail Kalinin 96334e3ee7 Switch to suggested td computation formula 2021-06-07 22:21:36 +06: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 7d59016bb8
Merge constant/preset/config separation 2021-05-18 09:31:07 +02:00
protolambda d3160ba23a
update ExecutionEngine protocol arg references 2021-05-14 01:07:22 +02:00
protolambda 0390ab819a
Protocols pyspec support + execution payload tests cleanup 2021-05-12 02:40:23 +02:00
protolambda f58ba8f5b2
define execution engine protocol 2021-05-10 16:11:12 +02:00
protolambda 76b5974d11
is_execution_enabled function + misc review fixes
Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>
2021-05-06 02:23:13 +02:00
protolambda e2be7614cc
introduce merge fork version 2021-05-05 15:35:36 +02:00
protolambda 521cffc3e9
update execution-payload processing to isolate payload from block body 2021-05-05 00:17:10 +02:00
Paul Hauner c0f1231522
Rename MAX_APPLICATION_TRANSACTIONS 2021-04-19 15:24:06 +10:00
Danny Ryan c7166a37af
change eth1data block_hash type to Hash32 in phase 0 2021-04-15 06:47:11 -05:00
Mikhail Kalinin 9d79831b56 Rename validate_execution_payload to verify_execution_state_transition 2021-04-14 13:03:58 +06:00
Mikhail Kalinin 292fd604f8 Replace boolean with bool whenever make sense 2021-04-14 12:54:49 +06:00
Mikhail Kalinin 7d8570d488 Warn about potential overflows in compute_time_at_slot 2021-04-14 12:53:30 +06:00
Mikhail Kalinin dbbc63b7a3 Replace execution_state_transition with validate_execution_payload 2021-04-13 19:13:54 +06:00
Mikhail Kalinin ad0f1e5620 Add timestamp field into ExecutionPayload 2021-04-13 19:08:47 +06:00
Mikhail Kalinin 13edd20a36 Change Eth1Data.block_hash type to Hash32 2021-04-13 15:29:07 +06:00
Mikhail Kalinin ac175fd325 Replace state with its root in execution_state_transition params 2021-04-09 19:16:52 +06:00
Mikhail Kalinin 334a9b2434 Pass timestamp to execution state transition and payload production 2021-04-09 19:14:58 +06:00
Mikhail Kalinin a1ded22b3a Introduce Hash32 custom type 2021-04-09 19:09:00 +06:00
Danny Ryan af9ea0efb6
Merge branch 'dev' into merge-exe 2021-04-09 07:21:51 -05:00
Mikhail Kalinin ffe7d6db6a Add pre-merge path to the process_execution_payload 2021-04-09 15:36:45 +06:00
Mikhail Kalinin 68b11ad4ad Fix pre-condition checks in process_execution_payload 2021-04-08 20:14:34 +06:00
Mikhail Kalinin 13586cd9f8 Polishing and fixes according to github comments 2021-04-08 20:14:01 +06:00
Mikhail Kalinin c1101a8181 Apply new terminology to the merge spec 2021-04-08 14:29:05 +06:00
Hsiao-Wei Wang 6e8b4b3ea9
Add eth2spec.merge.spec 2021-04-08 05:57:16 +08:00
Mikhail Kalinin 2a4756da2e Add transactions_root to ApplicationBlockHeader 2021-04-06 11:48:33 +06:00
Mikhail Kalinin 79aee8645d Implement ApplicationBlockHeader 2021-04-02 21:01:49 +06:00
Mikhail Kalinin 106e1b98ba Add parent_hash, number to ApplicationPayload 2021-03-31 16:10:02 +06:00
terence tsao eca6bd7d62 Fix merge beacon chain spec's toc 2021-03-29 11:56:43 -07:00
Danny Ryan 223aba3e78
byte-list for opaque transaction payload 2021-03-26 13:50:46 -06:00
Danny Ryan 41a087a78d
minor edits from code review
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-26 13:12:53 -06:00
Mikhail Kalinin 81a2c2c2b5 Use ByteList[N] and ByteVector[N] types 2021-03-25 18:41:00 +06:00
Mikhail Kalinin a23bde347b Bytes1 to byte in ApplicationPayload.logs_bloom 2021-03-25 17:51:32 +06:00
Mikhail Kalinin ee5ecf8e2b Address a new portion of comments and fixes 2021-03-25 17:49:13 +06:00
Mikhail Kalinin ea5f606bd0 Address various cleanups and formatting suggestions 2021-03-24 16:30:29 +06:00
Mikhail Kalinin 7e6ac4e7f7 Boolean -> boolean 2021-03-22 21:20:05 +06:00
Mikhail Kalinin 83453d212e Simplify merge.BeaconState definition 2021-03-22 21:14:31 +06:00
Mikhail Kalinin 38a455c79f Verify that ApplicationPayload is zeroed before the transition 2021-03-22 20:58:34 +06:00
Mikhail Kalinin 24dc8a277f
Fix block_body variable in is_transition_block
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2021-03-22 20:54:44 +06:00