Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EIP-7805 (FOCIL) specs #4003

Open
wants to merge 45 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
3a16a0e
Add focil containers
terencechain Sep 11, 2024
fa27c8f
Add process inclusion list aggregate
terencechain Sep 12, 2024
3c86963
Add inclusion list gossip conditions
terencechain Sep 14, 2024
8a1e940
Add execution api
terencechain Sep 15, 2024
833be94
Add validator spec
terencechain Sep 16, 2024
a2b68a7
Review feedback
terencechain Sep 17, 2024
fb4a3c3
Update forkchoice
terencechain Sep 17, 2024
c7a056b
Update based on latest discussion. No more IL aggregate
terencechain Sep 21, 2024
f84556c
Update fork-choice.md
terencechain Sep 26, 2024
2787b0d
Update per https://ethresear.ch/t/focil-cl-el-workflow/20526
terencechain Sep 30, 2024
0b09f96
Address feedback
terencechain Oct 2, 2024
6056b69
Clarify forkchoice and p2p
terencechain Oct 12, 2024
a8aec7c
Remove local
terencechain Oct 17, 2024
cbe6129
suggested changes
fradamt Oct 22, 2024
0efcf13
Merge pull request #5 from fradamt/focil-patch
terencechain Oct 22, 2024
f151c7c
replace parent_root with il_committee_root
fradamt Oct 22, 2024
b181655
add timing logic (deaadlines) to IL processing
fradamt Oct 23, 2024
0681f8c
missing :
fradamt Oct 25, 2024
2861684
Merge pull request #6 from fradamt/focil-patch
terencechain Oct 29, 2024
e678deb
Use eip7805
terencechain Nov 4, 2024
e9fdfc6
@jtraglia's suggestions
terencechain Nov 8, 2024
6ce0077
Update new inclusion list comments
terencechain Nov 19, 2024
be471b8
P2p spec feedbacks
terencechain Nov 19, 2024
c443db0
Add get attester head
terencechain Nov 19, 2024
c8b6296
Fix typo and make CI happy
hwwhww Dec 2, 2024
7fa44f4
fix byte limit check
fradamt Dec 16, 2024
84acfbb
ensure valid committee with <16 validators
nerolation Dec 30, 2024
702b9e5
Merge pull request #7 from nerolation/patch-1
terencechain Jan 2, 2025
561aed7
Merge branch 'dev' into focil-consensus
jtraglia Jan 14, 2025
c762a33
Add eip7805 to list of executable specs
jtraglia Jan 14, 2025
20b0c50
Fix simple linter warnings
jtraglia Jan 14, 2025
aca38ea
Fix some more linter issues
jtraglia Jan 14, 2025
1c6761a
Add execution_requests_list to notify_new_payload
jtraglia Jan 14, 2025
d63042e
Fix things regarding engine API
jtraglia Jan 14, 2025
86c86d0
Update eth2spec before linting
jtraglia Jan 14, 2025
7d8e6fb
Expand acronym in DOMAIN_IL_COMMITTEE and IL_COMMITTEE_SIZE
jtraglia Jan 14, 2025
19b50a6
Rename il_transactions to inclusion_list_transactions
jtraglia Jan 14, 2025
f25efbf
Change engine API param type to Sequence[Transaction]
jtraglia Jan 14, 2025
5a37c91
Fix various nits
jtraglia Jan 14, 2025
c411d45
Replace "since" with "up to"
jtraglia Jan 14, 2025
dcd31d6
Pull in electra's changes to verify_and_notify_new_payload
jtraglia Jan 14, 2025
3652904
Change inclusion_list_transactions to a Sequence
jtraglia Jan 15, 2025
2781459
Make some improvements to fork-choice doc
jtraglia Jan 15, 2025
7a2cb7a
Make time params work with minimal
jtraglia Jan 24, 2025
91054e6
Fix networking toc
jtraglia Jan 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ tests/core/pyspec/eth2spec/fulu/
tests/core/pyspec/eth2spec/whisk/
tests/core/pyspec/eth2spec/eip6800/
tests/core/pyspec/eth2spec/eip7732/
tests/core/pyspec/eth2spec/eip7805/

# coverage reports
.htmlcov
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ ALL_EXECUTABLE_SPEC_NAMES = \
fulu \
whisk \
eip6800 \
eip7732
eip7732 \
eip7805

# A list of fake targets.
.PHONY: \
Expand Down Expand Up @@ -211,7 +212,7 @@ _check_toc: $(MARKDOWN_FILES:=.toc)
@[ "$$(find . -name '*.md.tmp' -print -quit)" ] && exit 1 || exit 0

# Check for mistakes.
lint: $(ETH2SPEC) pyspec _check_toc
lint: eth2spec pyspec _check_toc
@$(CODESPELL_VENV) . --skip "./.git,$(VENV),$(PYSPEC_DIR)/.mypy_cache" -I .codespell-whitelist
@$(PYTHON_VENV) -m flake8 --config $(FLAKE8_CONFIG) $(PYSPEC_DIR)/eth2spec
@$(PYTHON_VENV) -m flake8 --config $(FLAKE8_CONFIG) $(TEST_GENERATORS_DIR)
Expand Down Expand Up @@ -275,4 +276,4 @@ kzg_setups: $(ETH2SPEC)

# Delete all untracked files.
clean:
@git clean -fdx
@git clean -fdx
5 changes: 5 additions & 0 deletions configs/mainnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,8 @@ WHISK_PROPOSER_SELECTION_GAP: 2

# EIP7732
MAX_REQUEST_PAYLOADS: 128

# EIP7805
ATTESTATION_DEADLINE: 4
PROPOSER_INCLUSION_LIST_CUT_OFF: 11
VIEW_FREEZE_DEADLINE: 9
5 changes: 5 additions & 0 deletions configs/minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,8 @@ WHISK_PROPOSER_SELECTION_GAP: 1

# EIP7732
MAX_REQUEST_PAYLOADS: 128

# EIP7805
ATTESTATION_DEADLINE: 2
PROPOSER_INCLUSION_LIST_CUT_OFF: 5
VIEW_FREEZE_DEADLINE: 3
1 change: 1 addition & 0 deletions pysetup/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
EIP6800 = 'eip6800'
WHISK = 'whisk'
EIP7732 = 'eip7732'
EIP7805 = 'eip7805'


# The helper functions that are used when defining constants
Expand Down
2 changes: 1 addition & 1 deletion pysetup/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def combine_dicts(old_dict: Dict[str, T], new_dict: Dict[str, T]) -> Dict[str, T
'uint8', 'uint16', 'uint32', 'uint64', 'uint128', 'uint256',
'bytes', 'byte', 'ByteList', 'ByteVector',
'Dict', 'dict', 'field', 'ceillog2', 'floorlog2', 'Set',
'Optional', 'Sequence',
'Optional', 'Sequence', 'Tuple',
]


Expand Down
2 changes: 2 additions & 0 deletions pysetup/md_doc_paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
WHISK,
EIP6800,
EIP7732,
EIP7805,
)


Expand All @@ -25,6 +26,7 @@
WHISK: CAPELLA,
EIP6800: DENEB,
EIP7732: ELECTRA,
EIP7805: ELECTRA,
}

ALL_FORKS = list(PREVIOUS_FORK_OF.keys())
Expand Down
2 changes: 2 additions & 0 deletions pysetup/spec_builders/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
from .whisk import WhiskSpecBuilder
from .eip6800 import EIP6800SpecBuilder
from .eip7732 import EIP7732SpecBuilder
from .eip7805 import EIP7805SpecBuilder


spec_builders = {
builder.fork: builder
for builder in (
Phase0SpecBuilder, AltairSpecBuilder, BellatrixSpecBuilder, CapellaSpecBuilder, DenebSpecBuilder,
ElectraSpecBuilder, FuluSpecBuilder, WhiskSpecBuilder, EIP6800SpecBuilder, EIP7732SpecBuilder,
EIP7805SpecBuilder,
)
}
47 changes: 47 additions & 0 deletions pysetup/spec_builders/eip7805.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
from .base import BaseSpecBuilder
from ..constants import EIP7805


class EIP7805SpecBuilder(BaseSpecBuilder):
fork: str = EIP7805


@classmethod
def execution_engine_cls(cls) -> str:
return """
class NoopExecutionEngine(ExecutionEngine):

def notify_new_payload(self: ExecutionEngine,
execution_payload: ExecutionPayload,
parent_beacon_block_root: Root,
execution_requests_list: Sequence[bytes],
inclusion_list_transactions: Sequence[Transaction]) -> bool:
return True

def notify_forkchoice_updated(self: ExecutionEngine,
head_block_hash: Hash32,
safe_block_hash: Hash32,
finalized_block_hash: Hash32,
payload_attributes: Optional[PayloadAttributes]) -> Optional[PayloadId]:
pass

def get_payload(self: ExecutionEngine, payload_id: PayloadId) -> GetPayloadResponse:
# pylint: disable=unused-argument
raise NotImplementedError("no default block production")

def is_valid_block_hash(self: ExecutionEngine,
execution_payload: ExecutionPayload,
parent_beacon_block_root: Root,
execution_requests_list: Sequence[bytes],
inclusion_list_transactions: Sequence[Transaction]) -> bool:
return True

def is_valid_versioned_hashes(self: ExecutionEngine, new_payload_request: NewPayloadRequest) -> bool:
return True

def verify_and_notify_new_payload(self: ExecutionEngine,
new_payload_request: NewPayloadRequest) -> bool:
return True


EXECUTION_ENGINE = NoopExecutionEngine()"""
Loading