Commit Graph

70 Commits

Author SHA1 Message Date
Danny Ryan 3c25da8218
Merge pull request #2726 from ethereum/get_pow_block_at_ttd-tests
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests
2021-11-19 09:37:11 -07:00
Danny Ryan 8333514422
Update specs/merge/validator.md 2021-11-19 09:26:43 -07:00
Mikhail Kalinin 58968f9286 Rename coinbase to fee_recipient 2021-11-18 19:23:52 +06:00
Hsiao-Wei Wang 28762096d3
PR feedback from @mkalinin 2021-11-17 23:45:41 +08:00
Hsiao-Wei Wang e56bbb8c44
Fix `get_pow_block_at_terminal_total_difficulty` and add unit tests 2021-11-17 18:00:35 +08:00
Danny Ryan 61207c5b61
Apply suggestions from code review 2021-11-11 07:29:38 -07:00
Paul Hauner 6cfd38e800
Patch for genesis blocks 2021-11-11 11:47:01 +11:00
Mikhail Kalinin c6381345e2
Fixes TBH activation epoch check 2021-11-05 15:00:39 +06:00
Mikhail Kalinin a3380db597 Fix toc 2021-11-04 16:30:23 +06:00
Mikhail Kalinin 0ad344bf72 Make notify_forkchoice_updated return payload id value 2021-11-04 15:58:48 +06:00
Mikhail Kalinin 16cabb2881
Note the Proof-of-Custody for execution in validator.md
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2021-11-01 21:00:49 +06:00
Mikhail Kalinin dce6b09f51 State that validator must consider only fully validated blocks 2021-11-01 19:31:51 +06:00
Hsiao-Wei Wang 62504d9efd
Update `pow_chain` to dict and reuse it instead of calling `get_pow_block` 2021-10-26 21:59:33 +08:00
Danny Ryan 4bf88ba89e
Merge pull request #2683 from ethereum/remove-prepare-payload
remove prepare_payload
2021-10-19 09:41:44 -06:00
Danny Ryan 8023edc94b
cleanup some copy relatedto removal of prepare_payload 2021-10-19 09:28:52 -06:00
Danny Ryan 294b60a48b
pr feedback 2021-10-19 09:24:07 -06:00
Hsiao-Wei Wang 34335e0334
Remove `prepare_payload` leftover 2021-10-19 15:30:49 +08:00
Hsiao-Wei Wang ba582b3e3a
Fix setup.py parser and rename `TBH_ACTIVATION_EPOCH` -> `TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH` 2021-10-19 11:26:53 +08:00
Danny Ryan d5be6b5d68
remove prepare_payload in favor of a unification with notify_forkchoice_updated 2021-10-18 18:12:11 -06:00
Danny Ryan 3bfdc917e1
ad TBH_ACTIVATION_EPOCH 2021-10-18 13:38:08 -06:00
Danny Ryan 08ea4348c5
Merge branch 'dev' into terminal_blockhash_override_2 2021-09-27 11:01:10 -06:00
lsankar4033 9353c71a6d Fix spelling 2021-09-24 11:57:58 -07:00
Danny Ryan a48a6f46c4
fix lint 2021-09-24 06:32:08 -06:00
Danny Ryan 35a42c9d45
Apply suggestions from code review 2021-09-24 06:23:59 -06:00
lsankar4033 1ccb7d0a52 Inline TERMINAL_BLOCK_HASH and TERMINAL_TOTAL_DIFFICULTY usages 2021-09-23 09:52:02 -07:00
Mikhail Kalinin 0e2eb50675 Fix spelling 2021-09-23 15:30:14 +06:00
Mikhail Kalinin 41e06aec1b Introduce PayloadId type 2021-09-23 15:03:43 +06:00
Mikhail Kalinin 7d577ed422 Introduce ExecutionAddress type 2021-09-23 14:35:55 +06:00
Mikhail Kalinin b7deef1629 Clarity which state should be used in prepare_payload in a better way 2021-09-23 13:50:46 +06:00
Mikhail Kalinin c815f695cd
Polish comment in get_payload body
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-09-23 13:17:55 +06:00
lsankar4033 df6a834889 Add TERMINAL_BLOCK_HASH override 2021-09-22 11:18:41 -07:00
Mikhail Kalinin 38a4fd907e
Fix spelling
Co-authored-by: Hsiao-Wei Wang <hsiaowei.eth@gmail.com>
2021-09-22 23:56:10 +06: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 6f78e6a3ee Remove randao_reveal from validator.md 2021-09-16 11:28:04 +06:00
Mikhail Kalinin 6ba1f22404 Set ExecutionPayload.random to the previous randao_mix 2021-09-01 18:42:58 +06:00
Mikhail Kalinin 5a84224d1a Change transition_td to terminal_td in the merge spec 2021-08-30 18:23:25 +06:00
Danny Ryan 4c1156d504
rename eth1 and eth2 throughout specs and readme where reasonable 2021-08-18 17:13:24 -06:00
protolambda 17fad2dea2
rebase The Merge onto Altair base functionality 2021-07-22 16:36:41 +02:00
Mikhail Kalinin 65f6aa1b33 Replace PyUnion with Optional 2021-07-20 17:37:52 +06:00
Mikhail Kalinin add00ad2e0 Replace get_pow_chain_head with get_pow_block_at_total_difficulty in validator.md 2021-07-17 12:33:06 +06:00
Mikhail Kalinin a4a050e97a Enforce terminal PoW block to be on the cusp 2021-07-16 19:16:32 +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 cc20b80103 Fix linter, add more test helpers 2021-06-15 14:55:06 +06:00
Mikhail Kalinin 7d617bc7c0 Fix timestamp passed to produce_execution_payload 2021-06-11 22:46:24 +06:00
Mikhail Kalinin 95775e1b90 Add randao to execution payload 2021-06-11 16:05:19 +06:00