Commit Graph

37 Commits

Author SHA1 Message Date
Danny Ryan 757ad7851a
Merge branch 'dev' into terminal_blockhash_override_2 2021-09-27 11:24:48 -06: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 08ea4348c5
Merge branch 'dev' into terminal_blockhash_override_2 2021-09-27 11:01:10 -06:00
Mikhail Kalinin 11840ce51f Map EE calls on the PoS events defined in EIP-3675 2021-09-24 16:31:09 +06:00
Dmitrii Shmatko b1aa227983 Added `on_merge_block` client tests 2021-09-23 22:22:34 +03:00
Mikhail Kalinin 7ef938da77 Add notify_ prefix to EE functions sending notifications 2021-09-23 13:37:52 +06:00
lsankar4033 df6a834889 Add TERMINAL_BLOCK_HASH override 2021-09-22 11:18:41 -07:00
Mikhail Kalinin 06107ce7d8 Polish the description of execution engine functions 2021-09-22 18:29:58 +06:00
Mikhail Kalinin 18bfe3555f
Apply suggestions from code review
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-09-22 17:45:26 +06:00
Mikhail Kalinin b530e01761 Update calls to execution_engine 2021-09-20 20:57:45 +06:00
Mikhail Kalinin d0889b9001 Hardcode terminal total difficulty 2021-09-17 16:20:25 +06:00
Mikhail Kalinin 960a49afc9 Verify terminal PoW block after call to state_transition 2021-09-10 16:07:26 +06:00
Mikhail Kalinin 5a84224d1a Change transition_td to terminal_td in the merge spec 2021-08-30 18:23:25 +06:00
ericsson 96c05adcf8 Fix typing problem: `is_merge_block` accepts `BeaconBlockBody` as a second argument, while `BeaconBlock` is provided 2021-08-23 18:52:09 +03:00
Danny Ryan 4c1156d504
rename eth1 and eth2 throughout specs and readme where reasonable 2021-08-18 17:13:24 -06:00
Mikhail Kalinin a4a050e97a Enforce terminal PoW block to be on the cusp 2021-07-16 19:16:32 +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 6350e27366 Add difficulty field to PowBlock 2021-06-08 17:56:07 +06:00
Mikhail Kalinin 7f64757b51 Fix Optional[TransitionStore] issue to satisfy linter 2021-06-03 16:08:56 +06:00
Mikhail Kalinin 6604830729 Apply suggestions after the review 2021-06-02 15:00:01 +06:00
Mikhail Kalinin db32c8b013 Fix linter errors 2021-06-01 17:44:58 +06:00
Mikhail Kalinin 6226be9e1e Implement TransitionStore and transition total difficulty computation 2021-06-01 16:28:30 +06:00
protolambda f58ba8f5b2
define execution engine protocol 2021-05-10 16:11:12 +02:00
Mikhail Kalinin 79fc41146d Adjust is_transition_block call in fork-choice 2021-05-05 13:37:07 +06:00
Mikhail Kalinin 292fd604f8 Replace boolean with bool whenever make sense 2021-04-14 12:54:49 +06:00
Mikhail Kalinin 44de07fee9
Replace hash: Hash32 with block_hash: Hash32
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-04-13 15:20:45 +06:00
Mikhail Kalinin a1ded22b3a Introduce Hash32 custom type 2021-04-09 19:09:00 +06:00
Mikhail Kalinin c1101a8181 Apply new terminology to the merge spec 2021-04-08 14:29:05 +06:00
Mikhail Kalinin 106e1b98ba Add parent_hash, number to ApplicationPayload 2021-03-31 16:10:02 +06:00
Mikhail Kalinin 260a0a5273 Polish merge/fork-choice.md 2021-03-25 17:53:15 +06:00
Mikhail Kalinin ee5ecf8e2b Address a new portion of comments and fixes 2021-03-25 17:49:13 +06:00
Mikhail Kalinin 63ae9f2bdb Standardise PowBlock between fork-choice and validator 2021-03-24 20:58:31 +06:00
Mikhail Kalinin ea5f606bd0 Address various cleanups and formatting suggestions 2021-03-24 16:30:29 +06:00
Mikhail Kalinin 96de910b22 Distinguish invalid and not processed transition block 2021-03-22 21:55:35 +06:00
Mikhail Kalinin 46fc8a196d Strip down the merge to the pure consensus upgrade 2021-03-20 19:21:11 +06:00
Mikhail Kalinin a368f5d224 Lable Added/Remove notes with Merge explicitly 2021-03-17 15:59:14 +06:00
Mikhail Kalinin 0dec828d89 Add initial merge spec 2021-03-17 15:59:14 +06:00