Conversation
Signed-off-by: jflo <justin+github@florentine.us> Signed-off-by: Ralph Agent <ralph@besu.dev>
- Remove --tool argument and tool selection logic - Remove amp support - Simplify to always use claude with --dangerously-skip-permissions - Update usage and output messages Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Add inclusionListTransactions field (List<String> of hex-encoded transaction bytes) to EnginePayloadAttributesParameter with JSON serialization/deserialization and hex format validation. Fix test constructor calls to include new parameter and fix test data (valid even-length hex strings, null-safe list construction). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Pass inclusionListTransactions from EnginePayloadAttributesParameter through to the payload building process via preparePayload(). - Extended MergeMiningCoordinator.preparePayload() interface with inclusionListTransactions parameter (8th param), keeping 7-param default method for backwards compatibility - Updated MergeCoordinator and TransitionCoordinator implementations - Added getInclusionListBytes() helper in AbstractEngineForkchoiceUpdated to convert hex strings to Bytes for the preparePayload call - Created EngineForkchoiceUpdatedV4Test with tests for: - Missing PBSR validation (INVALID_PAYLOAD_ATTRIBUTES) - Missing slot number validation (INVALID_SLOT_NUMBER_PARAMS) - Null payload attributes handling - IL transactions passed to preparePayload - Null IL transactions handling - Withdrawal validation with V4 attributes - Protocol schedule empty handling Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
There was a problem hiding this comment.
does this constant warrant its own file or would it fit in naturally in an existing file containing constants?
There was a problem hiding this comment.
This could be inlined into InclusionListValidationResult
The spec's "anywhere-in-block" property means IL transactions can appear in any order within the payload. Replace ordered subsequence matching with HashSet-based membership check in both Strict and Lenient validators. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
EIP-7805 does not exclude blob transactions from inclusion lists. Blob txs only contain versioned hashes (not blob data) so their RLP-encoded size is comparable to regular transactions. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
|
|
||
| @Override | ||
| public boolean isEnabled() { | ||
| return true; |
There was a problem hiding this comment.
this makes no sense, how would one disable this selector? suggest removing the method from the interface.
| } | ||
|
|
||
| @Override | ||
| public List<Bytes> selectTransactions( |
There was a problem hiding this comment.
This method should also consider the amount of time the tx has been in the pool - older transactions that have been fairly priced while they have sat in pool are likely being censored.
| * @param selectorType the transaction selector type | ||
| */ | ||
| public record InclusionListConfiguration( | ||
| InclusionListValidationMode validationMode, InclusionListSelectorType selectorType) { |
There was a problem hiding this comment.
The type doesn't need its own class, just allow the configuration to take a generified reference to anything that implements the InclusionListSelector interface. Then InclusionListSelectorType can be removed.
|
Note: The In final DefaultInclusionListSelector selector = new DefaultInclusionListSelector(baseFeePerGas);This should be wired up to use the configured |
| final List<WithdrawalParameter> withdrawals; | ||
| private final Bytes32 parentBeaconBlockRoot; | ||
| private final Long slotNumber; | ||
| private final List<String> inclusionListTransactions; |
There was a problem hiding this comment.
Refactor this for stronger typing, the inclusionListTransactions field should be a List
Signed-off-by: jflo <justin+github@florentine.us>
| } | ||
|
|
||
| @Override | ||
| protected JsonRpcResponse handleSuccessfulExecution( |
There was a problem hiding this comment.
This method is unnecessary, it would make more sense to do this during validateParameters(), see engine-api-eip7805.md for details on newPayloadV5, and see that it does not require validation to happen after execution.
| return INVALID; | ||
| } | ||
|
|
||
| protected JsonRpcResponse handleSuccessfulExecution( |
There was a problem hiding this comment.
remove these, see comment re: EngineNewPayloadV5
| * @return The {@code TransactionSelectionResults} containing the results of transaction | ||
| * evaluation. | ||
| */ | ||
| public TransactionSelectionResults buildTransactionListForBlock( |
There was a problem hiding this comment.
@fab-10 this is a naive approach, would be open to your advice on optimizing profitability while making sure inclusion is respected.
Update StrictInclusionListValidator to apply the EIP-7805 conditional validation algorithm instead of a simple presence check: 1. Skip if T is present in the block (set lookup) 2. Skip if T.gas > gas_left (block has no room) 3. Validate nonce and balance of T.origin against post-execution state Returns INCLUSION_LIST_UNSATISFIED only when a transaction passes all three checks (i.e., could have been included but wasn't). Add InclusionListValidationContext record with gasLeft, accountNonces, and accountBalances for post-execution state. Update interface with 3-arg validate method; keep 2-arg default for backward compatibility. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
- Inline InclusionListValidationStatus as nested Status enum in InclusionListValidationResult - Delete InclusionListSelectorType and InclusionListConstants (merged into InclusionListConfiguration) - Move MAX_BYTES_PER_INCLUSION_LIST constant to InclusionListConfiguration - Replace InclusionListConfiguration.selectorType field with concrete selector instance - Remove isEnabled() from InclusionListTransactionSelector interface - Move baseFeePerGas from DefaultInclusionListSelector constructor to selectTransactions() parameter - Propagate InclusionListConfiguration through RunnerBuilder/JsonRpcMethodsFactory instead of just mode - Override syncResponse() in EngineNewPayloadV5 for IL validation (replaces handleSuccessfulExecution) - Delete scaffolding files: ralph.sh, progress.txt, AGENTS.md, CLAUDE.md, SPEC.md - Update all affected tests for new signatures and removed classes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
…ation US-010: Fix EngineGetInclusionListV1Test to pass DefaultInclusionListSelector US-011: Fix InclusionListWorkflowIntegrationTest constructor call US-013: Replace IL-first ordering with anywhere-in-block algorithm - Pool transactions are selected first - IL txs already in pool appear at their natural position - Remaining IL txs are appended at end (conditional inclusion) - Update tests to reflect no-ordering-requirement semantics Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Agent <ralph@besu.dev>
# Conflicts: # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/LondonFeeMarketBlockTransactionSelectorTest.java Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Justin Florentine <justin+github@florentine.us>
This leverage the already present order in the txpool Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
…o ralph/eip7805-inclusion-lists # Conflicts: # ethereum/blockcreation/src/test/java/org/hyperledger/besu/ethereum/blockcreation/LondonFeeMarketBlockTransactionSelectorTest.java
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Ralph/eip7805 inclusion lists
EIP-7805: Fork-Choice Enforced Inclusion Lists (FOCIL) — Engine API Implementation
This PR implements the execution-layer Engine API changes specified by EIP-7805 (FOCIL). The spec document used is
eip7805.mdin this repo, which mirrors the upstream Engine API spec for EIP-7805.Suggested review order
1. Core domain model (
ethereum/core) — start hereThese are small, self-contained classes with no external dependencies. They establish the vocabulary used everywhere else.
InclusionListConstants.javaMAX_BYTES_PER_INCLUSION_LIST = 2^13(spec: Constants)InclusionListValidationStatus.javaVALID,INVALID,UNSATISFIED— maps toINCLUSION_LIST_UNSATISFIEDstatus in the specInclusionListValidationResult.javaInclusionListValidator.javavalidate(payloadTransactions, inclusionListTransactions)StrictInclusionListValidator.javaLenientInclusionListValidator.javaInclusionListValidationMode.javaSTRICT/LENIENT) withcreateValidator()factoryInclusionListTransactionSelector.javaDefaultInclusionListSelector.javaInclusionListConfiguration.java/InclusionListSelectorType.java2. Engine API method:
engine_getInclusionListV1(spec)EngineGetInclusionListV1.java— New JSON-RPC handler. AcceptsparentHash, returnsArray of DATAtransaction bytes from mempool.-38006: Unknown parentif parent block not found (spec: §4)MAX_BYTES_PER_INCLUSION_LIST(spec: §2)RpcMethod.java— AddedENGINE_GET_INCLUSION_LIST_V1enum valueRpcErrorType.java— AddedUNKNOWN_PARENT(-38006) error codeEngineGetInclusionListV1Test.java3. Engine API method:
engine_newPayloadV5(spec)EngineNewPayloadV5.java— Extended to accept 5th parameterinclusionListTransactions. After successful execution, validates payload against IL constraints.INCLUSION_LIST_UNSATISFIEDin strict mode (spec: §1)VALIDin lenient mode (Besu extension for testnets)AbstractEngineNewPayload.java— AddedhandleSuccessfulExecution()template method hook for V5+ post-execution validationExecutionEngineJsonRpcMethod.java— AddedINCLUSION_LIST_UNSATISFIEDtoEngineStatusenum (spec: Response)EngineNewPayloadV5Test.java4. Engine API method:
engine_forkchoiceUpdatedV4(spec)EnginePayloadAttributesParameter.java— AddedinclusionListTransactionsfield to matchPayloadAttributesV4(spec: Structures)AbstractEngineForkchoiceUpdated.java— Passes IL transactions through to payload buildingEngineForkchoiceUpdatedV4Test.java,EnginePayloadAttributesParameterTest.java5. Payload building (spec: Routines > Payload building)
The spec says the built payload MUST satisfy IL constraints. This is implemented by:
BlockTransactionSelector.java— NewbuildTransactionListForBlock(List<Transaction>)overload that processes IL transactions first, then fills remaining gas with pool transactionsAbstractBlockCreator.java/MergeBlockCreator.java— NewcreateBlockoverloads accepting IL transactionsMergeCoordinator.java— Decodes IL bytes →Transactionobjects, passes to block creatorMergeMiningCoordinator.java— ExtendedpreparePayload()with 8th parameter for IL transactions (backwards-compatible default method)LondonFeeMarketBlockTransactionSelectorTest.java6. CLI configuration & wiring
EngineRPCOptions.java— Two new CLI flags:--engine-inclusion-list-validation-mode(strict|lenient),--engine-inclusion-list-selector-type(default)EngineRPCConfiguration.java— Record extended with new fields +toInclusionListConfiguration()RunnerBuilder.java/BesuCommand.java— Threads config through to Engine API method registrationJsonRpcMethodsFactory.java/ExecutionEngineJsonRpcMethods.java— Overloaded constructors to wire IL validator and register new methods underAMSTERDAMmilestoneEngineRPCOptionsTest.java7. Logging, metrics & integration tests
BesuMetricCategory.RPC):transactions_generated,bytes_generated,selector_duration_ms,validation_failuresInclusionListWorkflowIntegrationTest.java— End-to-end test:getInclusionListV1→forkchoiceUpdatedV4→newPayloadV5, covering both strict and lenient modes8. Documentation
docs/eip7805_inclusion_lists.md— Full API reference with JSON-RPC examplesSpec compliance summary
MAX_BYTES_PER_INCLUSION_LIST = 2^13InclusionListConstants.MAX_BYTES_PER_INCLUSION_LISTPayloadAttributesV4withinclusionListTransactionsEnginePayloadAttributesParameterengine_newPayloadV5with 5th IL paramEngineNewPayloadV5INCLUSION_LIST_UNSATISFIEDstatusEngineStatus.INCLUSION_LIST_UNSATISFIEDINVALID_BLOCK_HASHsupplanted byINVALIDengine_getInclusionListV1withparentHashEngineGetInclusionListV1-38006: Unknown parenterrorRpcErrorType.UNKNOWN_PARENTDefaultInclusionListSelectorfiltersTransactionType.BLOBMAX_BYTES_PER_INCLUSION_LISTengine_forkchoiceUpdatedV4withPayloadAttributesV4AbstractEngineForkchoiceUpdated+ V4 testBlockTransactionSelectorprioritizes IL txsWhat's NOT in this PR
AMSTERDAMmilestone but no fork schedule is set🤖 Generated with Claude Code