Skip to content

Commit

Permalink
Update Teku libraries to 25.2.0 (#1058)
Browse files Browse the repository at this point in the history
Update Teku libraries to 25.2.0 for Electra hardfork on Holesky and Sepolia networks. Update changelog for next release.
  • Loading branch information
usmansaleem authored Feb 14, 2025
1 parent 65ce049 commit 25af7a8
Show file tree
Hide file tree
Showing 11 changed files with 222 additions and 71 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## Next Release
## 25.2.0

> [!IMPORTANT]
> This is a required update for nodes running on Holesky or Sepolia network as it contains the configuration for the
Electra hard fork.

### Breaking Changes
- The behavior of reload API endpoint has been modified due to issue [#1018][issue_1018] implemented by PR [#1054][pr_1054].
Expand All @@ -24,6 +28,7 @@ The above are replaced by:
- Remove stale keys during reload API call. [#1018][issue_1018] [#1054][pr_1054]
- Use single cli option to specify AWS KMS tag name/value pairs. [#1055][pr_1055]
- Use single cli option to specify AWS Secrets tag name/value pairs. [#1055][pr_1055]
- Teku libraries updated to 25.2.0 with changes related to Electra hard fork on Holesky and Sepolia networks.

### Bugs Fixed:
- AWS KMS tag filter behavior has been fixed. [#1055][pr_1055]
Expand Down
1 change: 0 additions & 1 deletion acceptance-tests/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ dependencies {
testImplementation 'tech.pegasys.teku.internal:spec'
testImplementation 'tech.pegasys.teku.internal:networks'
testImplementation 'tech.pegasys.teku.internal:json'
testImplementation 'tech.pegasys.teku.internal:jackson'
testImplementation (group: 'tech.pegasys.teku.internal', name: 'spec', classifier: 'test-fixtures')
testImplementation (group: 'tech.pegasys.teku.internal', name: 'bls', classifier: 'test-fixtures')
testImplementation 'tech.pegasys.teku.internal:serializer'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void setup() {
void signAndVerifyBlockV2SignatureForAllEnabledMilestones() throws Exception {
final Spec spec = SpecFactory.create(NETWORK_CONFIG_PATH.toString());
final List<ForkAndSpecMilestone> enabledMilestones = spec.getEnabledMilestones();
assertThat(enabledMilestones.size()).isEqualTo(5);
assertThat(enabledMilestones.size()).isEqualTo(2);

for (final ForkAndSpecMilestone forkAndSpecMilestone : enabledMilestones) {
final Eth2SigningRequestBody request =
Expand Down
177 changes: 136 additions & 41 deletions acceptance-tests/src/test/resources/eth2/network_config.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,112 @@
PRESET_BASE: 'minimal'
CONFIG_NAME: 'end-to-end'
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 256
GENESIS_DELAY: 10
MIN_GENESIS_TIME: 1578009600
GENESIS_FORK_VERSION: 0x000000fd
CHURN_LIMIT_QUOTIENT: 65536
SECONDS_PER_SLOT: 10
SLOTS_PER_EPOCH: 6
SECONDS_PER_ETH1_BLOCK: 2
ETH1_FOLLOW_DISTANCE: 8
EPOCHS_PER_ETH1_VOTING_PERIOD: 2
SHARD_COMMITTEE_PERIOD: 4
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 256
MAX_SEED_LOOKAHEAD: 1
# Extends the mainnet preset
PRESET_BASE: mainnet
CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts with mainnet genesis

# Genesis
# ---------------------------------------------------------------
# `2**14` (= 16,384)
MIN_GENESIS_ACTIVE_VALIDATOR_COUNT: 128
# 2025-Feb-14 01:34:19 AM UTC
MIN_GENESIS_TIME: 1739496859
GENESIS_FORK_VERSION: 0x10000038
GENESIS_DELAY: 0

# Forking
# ---------------------------------------------------------------
# Some forks are disabled for now:
# - These may be re-assigned to another fork-version later
# - Temporarily set to max uint64 value: 2**64 - 1

# Altair
ALTAIR_FORK_VERSION: 0x20000038
ALTAIR_FORK_EPOCH: 0
# Merge
BELLATRIX_FORK_VERSION: 0x30000038
BELLATRIX_FORK_EPOCH: 0
TERMINAL_TOTAL_DIFFICULTY: 0
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615

# Capella
CAPELLA_FORK_VERSION: 0x40000038
CAPELLA_FORK_EPOCH: 0

# DENEB
DENEB_FORK_VERSION: 0x50000038
DENEB_FORK_EPOCH: 0

# Electra
ELECTRA_FORK_VERSION: 0x60000038
ELECTRA_FORK_EPOCH: 1

# Fulu
FULU_FORK_VERSION: 0x70000038
FULU_FORK_EPOCH: 100000001

# EIP7732
EIP7732_FORK_VERSION: 0x80000038 11:34:48 [60/1305]
EIP7732_FORK_EPOCH: 100000002

# EIP7805
EIP7805_FORK_VERSION: 0x90000038
EIP7805_FORK_EPOCH: 100000003

# Time parameters
# ---------------------------------------------------------------
# 12 seconds
SECONDS_PER_SLOT: 12
# 14 (estimate from Eth1 mainnet)
SECONDS_PER_ETH1_BLOCK: 12
# 2**8 (= 256) epochs ~27 hours
MIN_VALIDATOR_WITHDRAWABILITY_DELAY: 1
# 2**8 (= 256) epochs ~27 hours
SHARD_COMMITTEE_PERIOD: 1
# 2**11 (= 2,048) Eth1 blocks ~8 hours
ETH1_FOLLOW_DISTANCE: 2048

# Validator cycle
# ---------------------------------------------------------------
# 2**2 (= 4)
INACTIVITY_SCORE_BIAS: 4
# 2**4 (= 16)
INACTIVITY_SCORE_RECOVERY_RATE: 16
# 2**4 * 10**9 (= 16,000,000,000) Gwei
EJECTION_BALANCE: 16000000000
# 2**2 (= 4)
MIN_PER_EPOCH_CHURN_LIMIT: 4
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 4
# 2**16 (= 65,536)
CHURN_LIMIT_QUOTIENT: 16
# [New in Deneb:EIP7514] 2**3 (= 8)
MAX_PER_EPOCH_ACTIVATION_CHURN_LIMIT: 8

# Fork choice
# ---------------------------------------------------------------
# 40%
PROPOSER_SCORE_BOOST: 40
# 20%
REORG_HEAD_WEIGHT_THRESHOLD: 20
# 160%
REORG_PARENT_WEIGHT_THRESHOLD: 160
# `2` epochs
REORG_MAX_EPOCHS_SINCE_FINALIZATION: 2

# Deposit contract
# ---------------------------------------------------------------
DEPOSIT_CHAIN_ID: 3151908
DEPOSIT_NETWORK_ID: 3151908
DEPOSIT_CONTRACT_ADDRESS: 0x4242424242424242424242424242424242424242

# Networking
# ---------------------------------------------------------------
# `10 * 2**20` (= 10485760, 10 MiB)
GOSSIP_MAX_SIZE: 10485760
# `2**10` (= 1024)
MAX_REQUEST_BLOCKS: 1024
## [customized] `MIN_VALIDATOR_WITHDRAWABILITY_DELAY + CHURN_LIMIT_QUOTIENT // 2` (= 272)
MIN_EPOCHS_FOR_BLOCK_REQUESTS: 272
# `10 * 2**20` (=10485760, 10 MiB)
# `2**8` (= 256)
EPOCHS_PER_SUBNET_SUBSCRIPTION: 256
# `MIN_VALIDATOR_WITHDRAWABILITY_DELAY + CHURN_LIMIT_QUOTIENT // 2` (= 33024, ~5 months)
MIN_EPOCHS_FOR_BLOCK_REQUESTS: 33024
# `10 * 2**20` (=10485760, 10 MiB)
MAX_CHUNK_SIZE: 10485760
# 5s
TTFB_TIMEOUT: 5
Expand All @@ -44,27 +125,6 @@ ATTESTATION_SUBNET_EXTRA_BITS: 0
# ceillog2(ATTESTATION_SUBNET_COUNT) + ATTESTATION_SUBNET_EXTRA_BITS
ATTESTATION_SUBNET_PREFIX_BITS: 6

DEPOSIT_CHAIN_ID: 1337
DEPOSIT_NETWORK_ID: 1337
# Configured on a per testnet basis
DEPOSIT_CONTRACT_ADDRESS: 0x1234567890123456789012345678901234567890

ALTAIR_FORK_EPOCH: 6
ALTAIR_FORK_VERSION: 0x010000fd
BELLATRIX_FORK_EPOCH: 8
BELLATRIX_FORK_VERSION: 0x020000fd
CAPELLA_FORK_EPOCH: 10
CAPELLA_FORK_VERSION: 0x030000fd
DENEB_FORK_VERSION: 0x04000001
DENEB_FORK_EPOCH: 12
SHARDING_FORK_EPOCH: 18446744073709551615
SHARDING_FORK_VERSION: 0x030000fd
INACTIVITY_SCORE_BIAS: 4
INACTIVITY_SCORE_RECOVERY_RATE: 16
TERMINAL_TOTAL_DIFFICULTY: 616
TERMINAL_BLOCK_HASH: 0x0000000000000000000000000000000000000000000000000000000000000000
TERMINAL_BLOCK_HASH_ACTIVATION_EPOCH: 18446744073709551615

# Deneb
# `2**7` (=128)
MAX_REQUEST_BLOCKS_DENEB: 128
Expand All @@ -73,4 +133,39 @@ MAX_REQUEST_BLOB_SIDECARS: 768
# `2**12` (= 4096 epochs, ~18 days)
MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS: 4096
# `6`
BLOB_SIDECAR_SUBNET_COUNT: 6
BLOB_SIDECAR_SUBNET_COUNT: 6
## `uint64(6)`
MAX_BLOBS_PER_BLOCK: 6

# Electra
# 2**7 * 10**9 (= 128,000,000,000)
MIN_PER_EPOCH_CHURN_LIMIT_ELECTRA: 128000000000
# 2**8 * 10**9 (= 256,000,000,000)
MAX_PER_EPOCH_ACTIVATION_EXIT_CHURN_LIMIT: 256000000000
# `9`
BLOB_SIDECAR_SUBNET_COUNT_ELECTRA: 9
# `uint64(6)`
TARGET_BLOBS_PER_BLOCK_ELECTRA: 6
# `uint64(9)`
MAX_BLOBS_PER_BLOCK_ELECTRA: 9
# MAX_REQUEST_BLOCKS_DENEB * MAX_BLOBS_PER_BLOCK_ELECTRA
MAX_REQUEST_BLOB_SIDECARS_ELECTRA: 1152

# Whisk
# `Epoch(2**8)`
WHISK_EPOCHS_PER_SHUFFLING_PHASE: 256
# `Epoch(2)`
WHISK_PROPOSER_SELECTION_GAP: 2

# Fulu
NUMBER_OF_COLUMNS: 128
NUMBER_OF_CUSTODY_GROUPS: 128
DATA_COLUMN_SIDECAR_SUBNET_COUNT: 128
MAX_REQUEST_DATA_COLUMN_SIDECARS: 16384
SAMPLES_PER_SLOT: 8
CUSTODY_REQUIREMENT: 4
MAX_BLOBS_PER_BLOCK_FULU: 12
MIN_EPOCHS_FOR_DATA_COLUMN_SIDECARS_REQUESTS: 4096

# EIP7732
MAX_REQUEST_PAYLOADS: 128
1 change: 0 additions & 1 deletion commandline/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ dependencies {
implementation 'tech.pegasys.teku.internal:unsigned'
implementation 'tech.pegasys.teku.internal:networks'
implementation 'tech.pegasys.teku.internal:json'
implementation 'tech.pegasys.teku.internal:jackson'

runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl'

Expand Down
1 change: 0 additions & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ dependencies {
implementation 'tech.pegasys.teku.internal:serializer'
implementation 'tech.pegasys.teku.internal:spec'
implementation 'tech.pegasys.teku.internal:unsigned'
implementation 'tech.pegasys.teku.internal:jackson'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j-impl'

testImplementation (testFixtures(project(":signing")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@
import tech.pegasys.teku.api.schema.BLSSignature;
import tech.pegasys.teku.infrastructure.bytes.Bytes20;
import tech.pegasys.teku.infrastructure.bytes.Bytes4;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.Bytes32Deserializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.Bytes4Deserializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.Bytes4Serializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.BytesDeserializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.BytesSerializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.DoubleDeserializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.bytes.DoubleSerializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.uints.UInt64Deserializer;
import tech.pegasys.teku.infrastructure.jackson.deserializers.uints.UInt64Serializer;
import tech.pegasys.teku.infrastructure.ssz.collections.SszBitvector;
import tech.pegasys.web3signer.common.JacksonSerializers.HexDeserialiser;
import tech.pegasys.web3signer.common.JacksonSerializers.HexSerialiser;
Expand Down Expand Up @@ -73,18 +64,20 @@ private Module web3SignerMappers() {
module.addDeserializer(UInt64.class, new StringUInt64Deserializer());
module.addSerializer(UInt64.class, new StringUInt64Serialiser());
module.addDeserializer(
tech.pegasys.teku.infrastructure.unsigned.UInt64.class, new UInt64Deserializer());
tech.pegasys.teku.infrastructure.unsigned.UInt64.class,
new SigningMetadataModule.TekuUInt64Deserializer());
module.addSerializer(
tech.pegasys.teku.infrastructure.unsigned.UInt64.class, new UInt64Serializer());
tech.pegasys.teku.infrastructure.unsigned.UInt64.class,
new SigningMetadataModule.TekuUInt64Serializer());

module.addSerializer(Bytes32.class, new Bytes32Serializer());
module.addDeserializer(Bytes32.class, new Bytes32Deserializer());
module.addDeserializer(Bytes4.class, new Bytes4Deserializer());
module.addSerializer(Bytes4.class, new Bytes4Serializer());
module.addDeserializer(Bytes.class, new BytesDeserializer());
module.addSerializer(Bytes.class, new BytesSerializer());
module.addDeserializer(Double.class, new DoubleDeserializer());
module.addSerializer(Double.class, new DoubleSerializer());
module.addDeserializer(Bytes32.class, new SigningMetadataModule.Bytes32Deserializer());
module.addDeserializer(Bytes4.class, new SigningMetadataModule.Bytes4Deserializer());
module.addSerializer(Bytes4.class, new SigningMetadataModule.Bytes4Serializer());
module.addDeserializer(Bytes.class, new SigningMetadataModule.BytesDeserializer());
module.addSerializer(Bytes.class, new SigningMetadataModule.BytesSerializer());
module.addDeserializer(Double.class, new SigningMetadataModule.DoubleDeserializer());
module.addSerializer(Double.class, new SigningMetadataModule.DoubleSerializer());

module.addSerializer(BLSPubKey.class, new BLSPubKeySerializer());
module.addDeserializer(BLSPubKey.class, new BLSPubKeyDeserializer());
Expand Down
3 changes: 1 addition & 2 deletions gradle/versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ dependencyManagement {

dependency 'org.xipki.iaik:sunpkcs11-wrapper:1.4.10'

dependencySet(group: 'tech.pegasys.teku.internal', version: '24.10.3') {
dependencySet(group: 'tech.pegasys.teku.internal', version: '25.2.0') {
entry ('bls') {
exclude group: 'org.bouncycastle', name: 'bcprov-jdk15on'
}
Expand All @@ -107,7 +107,6 @@ dependencyManagement {
entry 'async'
entry 'networks'
entry 'json'
entry 'jackson'
}

dependency 'tech.pegasys:jblst:0.3.12'
Expand Down
1 change: 0 additions & 1 deletion signing/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ dependencies {
implementation 'tech.pegasys.teku.internal:bls'
implementation 'tech.pegasys.teku.internal:bls-keystore'
implementation 'tech.pegasys.teku.internal:serializer'
implementation 'tech.pegasys.teku.internal:jackson'
implementation 'tech.pegasys.teku.internal:spec'
implementation 'tech.pegasys.teku.internal:unsigned'
implementation 'com.azure:azure-security-keyvault-keys'
Expand Down
Loading

0 comments on commit 25af7a8

Please sign in to comment.