diff --git a/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java b/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java index 1842ee7dff5..346dcb11ec5 100644 --- a/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java +++ b/ethereum/networks/src/main/java/tech/pegasys/teku/networks/Eth2NetworkConfiguration.java @@ -437,6 +437,9 @@ public Eth2NetworkConfiguration build() { builder.electraBuilder( electraBuilder -> electraForkEpoch.ifPresent(electraBuilder::electraForkEpoch)); + builder.eip7805Builder( + eip7805Builder -> + electraForkEpoch.ifPresent(eip7805Builder::eip7805ForkEpoch)); }); } if (spec.getForkSchedule().getSupportedMilestones().contains(SpecMilestone.DENEB) diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805.java index f20ad4190ce..fa266791e18 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805.java @@ -35,7 +35,7 @@ static SpecConfigEip7805 required(final SpecConfig specConfig) { int getIlCommitteeSize(); - int getMaxTransactionPerInclusionList(); + int getMaxTransactionsPerInclusionList(); @Override Optional toVersionEip7805(); diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805Impl.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805Impl.java index 789ecaf955b..919816651dd 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805Impl.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigEip7805Impl.java @@ -25,19 +25,19 @@ public class SpecConfigEip7805Impl extends DelegatingSpecConfigElectra private final Bytes4 eip7805ForkVersion; private final UInt64 eip7805ForkEpoch; private final int ilCommitteeSize; - private final int maxTransactionPerInclusionList; + private final int maxTransactionsPerInclusionList; public SpecConfigEip7805Impl( final SpecConfigElectra specConfig, final Bytes4 eip7805ForkVersion, final UInt64 eip7805ForkEpoch, final int ilCommitteeSize, - final int maxTransactionPerInclusionList) { + final int maxTransactionsPerInclusionList) { super(specConfig); this.eip7805ForkVersion = eip7805ForkVersion; this.eip7805ForkEpoch = eip7805ForkEpoch; this.ilCommitteeSize = ilCommitteeSize; - this.maxTransactionPerInclusionList = maxTransactionPerInclusionList; + this.maxTransactionsPerInclusionList = maxTransactionsPerInclusionList; } @Override @@ -56,8 +56,8 @@ public int getIlCommitteeSize() { } @Override - public int getMaxTransactionPerInclusionList() { - return maxTransactionPerInclusionList; + public int getMaxTransactionsPerInclusionList() { + return maxTransactionsPerInclusionList; } @Override @@ -83,7 +83,7 @@ public boolean equals(final Object o) { && Objects.equals(eip7805ForkVersion, that.eip7805ForkVersion) && Objects.equals(eip7805ForkEpoch, that.eip7805ForkEpoch) && ilCommitteeSize == that.ilCommitteeSize - && maxTransactionPerInclusionList == that.maxTransactionPerInclusionList; + && maxTransactionsPerInclusionList == that.maxTransactionsPerInclusionList; } @Override @@ -93,6 +93,6 @@ public int hashCode() { eip7805ForkVersion, eip7805ForkEpoch, ilCommitteeSize, - maxTransactionPerInclusionList); + maxTransactionsPerInclusionList); } } diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigLoader.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigLoader.java index b7aebebb946..0a38fcc3f7e 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigLoader.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/SpecConfigLoader.java @@ -32,7 +32,7 @@ public class SpecConfigLoader { private static final Logger LOG = LogManager.getLogger(); private static final List AVAILABLE_PRESETS = - List.of("phase0", "altair", "bellatrix", "capella", "deneb", "electra"); + List.of("phase0", "altair", "bellatrix", "capella", "deneb", "electra", "eip7805"); private static final String CONFIG_PATH = "configs/"; private static final String PRESET_PATH = "presets/"; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/Eip7805Builder.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/Eip7805Builder.java index 1c1b5e0a7e0..db21f757a50 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/Eip7805Builder.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/Eip7805Builder.java @@ -33,7 +33,7 @@ public class Eip7805Builder implements ForkConfigBuilder build( eip7805ForkVersion, eip7805ForkEpoch, ilCommitteeSize, - maxTransactionPerInclusionList), + maxTransactionsPerInclusionList), specConfigAndParent); } @@ -68,10 +68,10 @@ public Eip7805Builder ilCommitteeSize(final Integer ilCommitteeSize) { return this; } - public Eip7805Builder maxTransactionPerInclusionList( - final Integer maxTransactionPerInclusionList) { - checkNotNull(maxTransactionPerInclusionList); - this.maxTransactionPerInclusionList = maxTransactionPerInclusionList; + public Eip7805Builder maxTransactionsPerInclusionList( + final Integer maxTransactionsPerInclusionList) { + checkNotNull(maxTransactionsPerInclusionList); + this.maxTransactionsPerInclusionList = maxTransactionsPerInclusionList; return this; } @@ -96,8 +96,8 @@ public Map getValidationMap() { constants.put("eip7805ForkEpoch", eip7805ForkEpoch); constants.put("eip7805ForkVersion", eip7805ForkVersion); - constants.put("ptcSize", ilCommitteeSize); - constants.put("maxPayloadAttestations", maxTransactionPerInclusionList); + constants.put("ilCommitteeSize", ilCommitteeSize); + constants.put("maxTransactionsPerInclusionList", maxTransactionsPerInclusionList); ; return constants; diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/SpecConfigBuilder.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/SpecConfigBuilder.java index b06c88058ef..f6eca22950d 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/SpecConfigBuilder.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/config/builder/SpecConfigBuilder.java @@ -29,7 +29,7 @@ import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.config.SpecConfig; import tech.pegasys.teku.spec.config.SpecConfigAndParent; -import tech.pegasys.teku.spec.config.SpecConfigElectra; +import tech.pegasys.teku.spec.config.SpecConfigEip7805; import tech.pegasys.teku.spec.config.SpecConfigPhase0; @SuppressWarnings({"UnusedReturnValue", "unused"}) @@ -132,14 +132,15 @@ public class SpecConfigBuilder { private Integer reorgParentWeightThreshold = 160; private UInt64 maxPerEpochActivationExitChurnLimit = UInt64.valueOf(256000000000L); - private final BuilderChain builderChain = + private final BuilderChain builderChain = BuilderChain.create(new AltairBuilder()) .appendBuilder(new BellatrixBuilder()) .appendBuilder(new CapellaBuilder()) .appendBuilder(new DenebBuilder()) - .appendBuilder(new ElectraBuilder()); + .appendBuilder(new ElectraBuilder()) + .appendBuilder(new Eip7805Builder()); - public SpecConfigAndParent build() { + public SpecConfigAndParent build() { builderChain.addOverridableItemsToRawConfig( (key, value) -> { if (value != null) { diff --git a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/mainnet.yaml b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/mainnet.yaml index 8bd4a039440..755664eeef1 100644 --- a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/mainnet.yaml +++ b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/mainnet.yaml @@ -53,6 +53,9 @@ DENEB_FORK_EPOCH: 269568 # March 13, 2024, 01:55:35pm UTC # Electra ELECTRA_FORK_VERSION: 0x05000000 ELECTRA_FORK_EPOCH: 18446744073709551615 +# EIP7805 +EIP7805_FORK_VERSION: 0x09000000 # temporary stub +EIP7805_FORK_EPOCH: 18446744073709551615 # Time parameters @@ -155,4 +158,8 @@ BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9 # `uint64(9)` MAX_BLOBS_PER_BLOCK_ELECTRA: 9 # MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA -MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 \ No newline at end of file +MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 + +# EIP7805 +IL_COMMITTEE_SIZE: 16 +MAX_TRANSACTIONS_PER_INCLUSION_LIST: 1 \ No newline at end of file diff --git a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/minimal.yaml b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/minimal.yaml index cb1b1bda8d8..7e9ccaaeea6 100644 --- a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/minimal.yaml +++ b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/minimal.yaml @@ -52,6 +52,9 @@ DENEB_FORK_EPOCH: 18446744073709551615 # Electra ELECTRA_FORK_VERSION: 0x05000001 ELECTRA_FORK_EPOCH: 18446744073709551615 +# EIP7805 +EIP7805_FORK_VERSION: 0x09000000 # temporary stub +EIP7805_FORK_EPOCH: 18446744073709551615 # Time parameters # --------------------------------------------------------------- @@ -155,4 +158,8 @@ BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9 # `uint64(9)` MAX_BLOBS_PER_BLOCK_ELECTRA: 9 # MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA -MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 \ No newline at end of file +MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 + +# EIP7805 +IL_COMMITTEE_SIZE: 16 +MAX_TRANSACTIONS_PER_INCLUSION_LIST: 1 \ No newline at end of file diff --git a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/swift.yaml b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/swift.yaml index 8e85a5847a0..49583ef15a0 100644 --- a/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/swift.yaml +++ b/ethereum/spec/src/main/resources/tech/pegasys/teku/spec/config/configs/swift.yaml @@ -150,4 +150,8 @@ BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9 # `uint64(9)` MAX_BLOBS_PER_BLOCK_ELECTRA: 9 # MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA -MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 \ No newline at end of file +MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152 + +# EIP7805 +IL_COMMITTEE_SIZE: 16 +MAX_TRANSACTIONS_PER_INCLUSION_LIST: 1 \ No newline at end of file