Skip to content

Commit 448d1a9

Browse files
committed
Merge branch 'main' into zkbesu
2 parents 1bb7624 + 702ce74 commit 448d1a9

File tree

397 files changed

+1447
-1059
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

397 files changed

+1447
-1059
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
### Upcoming Breaking Changes
1212
- `MetricSystem::createLabelledGauge` is deprecated and will be removed in a future release, replace it with `MetricSystem::createLabelledSuppliedGauge`
1313
- k8s (KUBERNETES) Nat method is now deprecated and will be removed in a future release. Use docker or none instead.
14+
- `--Xsnapsync-synchronizer-flat-db-healing-enabled` is deprecated, use `--Xbonsai-full-flat-db-enabled` instead.
15+
- `--Xbonsai-limit-trie-logs-enabled` is deprecated, use `--bonsai-limit-trie-logs-enabled` instead.
16+
- `--Xbonsai-trie-log-pruning-enabled` is deprecated, use `--bonsai-limit-trie-logs-enabled` instead.
17+
- `--Xbonsai-trie-logs-pruning-window-size` is deprecated, use `--bonsai-trie-logs-pruning-window-size` instead.
1418
- Sunsetting features - for more context on the reasoning behind the deprecation of these features, including alternative options, read [this blog post](https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu)
1519
- Tessera privacy
1620
- Smart-contract-based (onchain) permissioning
@@ -25,6 +29,9 @@
2529
- Improve debug_traceBlock calls performance and reduce output size [#8076](https://github.com/hyperledger/besu/pull/8076)
2630
- Add support for EIP-7702 transaction in the txpool [#8018](https://github.com/hyperledger/besu/pull/8018) [#7984](https://github.com/hyperledger/besu/pull/7984)
2731
- Add support for `movePrecompileToAddress` in `StateOverrides` (`eth_call`)[8115](https://github.com/hyperledger/besu/pull/8115)
32+
- Default target-gas-limit to 36M for holesky [#8125](https://github.com/hyperledger/besu/pull/8125)
33+
- Add EIP-7623 - Increase calldata cost [#8093](https://github.com/hyperledger/besu/pull/8093)
34+
- Add nonce to transaction call object [#8139](https://github.com/hyperledger/besu/pull/8139)
2835

2936
### Bug fixes
3037
- Fix serialization of state overrides when `movePrecompileToAddress` is present [#8204](https://github.com/hyperledger/besu/pull/8024)

acceptance-tests/dsl/src/main/java/org/hyperledger/besu/tests/acceptance/dsl/transaction/eth/EthEstimateGasTransaction.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*/
1515
package org.hyperledger.besu.tests.acceptance.dsl.transaction.eth;
1616

17+
import static org.web3j.protocol.core.DefaultBlockParameterName.LATEST;
18+
1719
import org.hyperledger.besu.tests.acceptance.dsl.transaction.NodeRequests;
1820
import org.hyperledger.besu.tests.acceptance.dsl.transaction.Transaction;
1921

@@ -36,11 +38,13 @@ public EthEstimateGasTransaction(final String contractAddress, final String func
3638
public EthEstimateGas execute(final NodeRequests node) {
3739
try {
3840

41+
var nonce = node.eth().ethGetTransactionCount(from, LATEST).send().getTransactionCount();
42+
3943
return node.eth()
4044
.ethEstimateGas(
4145
new org.web3j.protocol.core.methods.request.Transaction(
4246
from,
43-
BigInteger.ONE,
47+
nonce,
4448
BigInteger.ZERO,
4549
BigInteger.ZERO,
4650
contractAddress,

acceptance-tests/tests/src/test/resources/dev/dev_prague.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,18 @@
1818
"blobSchedule": {
1919
"cancun": {
2020
"target": 3,
21-
"max": 6
21+
"max": 6,
22+
"baseFeeUpdateFraction": 3338477
2223
},
2324
"prague": {
2425
"target": 6,
25-
"max": 9
26+
"max": 9,
27+
"baseFeeUpdateFraction": 5007716
2628
},
2729
"osaka": {
2830
"target": 9,
29-
"max": 12
31+
"max": 12,
32+
"baseFeeUpdateFraction": 5007716
3033
}
3134
},
3235
"clique": {

besu/src/main/java/org/hyperledger/besu/cli/BesuCommand.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,6 +2132,13 @@ private MiningConfiguration getMiningParameters() {
21322132
getGenesisBlockPeriodSeconds(genesisConfigOptionsSupplier.get())
21332133
.ifPresent(miningParameters::setBlockPeriodSeconds);
21342134
initMiningParametersMetrics(miningParameters);
2135+
// if network = holesky, set targetGasLimit to 36,000,000 unless otherwise specified
2136+
if (miningParameters.getTargetGasLimit().isEmpty() && NetworkName.HOLESKY.equals(network)) {
2137+
logger.info(
2138+
"Setting target gas limit for holesky: {}",
2139+
MiningConfiguration.DEFAULT_TARGET_GAS_LIMIT_HOLESKY);
2140+
miningParameters.setTargetGasLimit(MiningConfiguration.DEFAULT_TARGET_GAS_LIMIT_HOLESKY);
2141+
}
21352142
return miningParameters;
21362143
}
21372144

besu/src/test/java/org/hyperledger/besu/cli/BesuCommandTest.java

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1911,6 +1911,58 @@ public void holeskyValuesAreUsed() {
19111911
verify(mockLogger, never()).warn(contains("Holesky is deprecated and will be shutdown"));
19121912
}
19131913

1914+
@Test
1915+
public void holeskyTargetGasLimitIsSetToHoleskyDefaultWhenNoValueSpecified() {
1916+
parseCommand("--network", "holesky");
1917+
1918+
final ArgumentCaptor<EthNetworkConfig> networkArg =
1919+
ArgumentCaptor.forClass(EthNetworkConfig.class);
1920+
1921+
final ArgumentCaptor<MiningConfiguration> miningArg =
1922+
ArgumentCaptor.forClass(MiningConfiguration.class);
1923+
1924+
verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
1925+
verify(mockControllerBuilder).miningParameters(miningArg.capture());
1926+
verify(mockControllerBuilder).build();
1927+
1928+
assertThat(networkArg.getValue()).isEqualTo(EthNetworkConfig.getNetworkConfig(HOLESKY));
1929+
1930+
assertThat(miningArg.getValue().getCoinbase()).isEqualTo(Optional.empty());
1931+
assertThat(miningArg.getValue().getMinTransactionGasPrice()).isEqualTo(Wei.of(1000));
1932+
assertThat(miningArg.getValue().getExtraData()).isEqualTo(Bytes.EMPTY);
1933+
assertThat(miningArg.getValue().getTargetGasLimit().getAsLong())
1934+
.isEqualTo(MiningConfiguration.DEFAULT_TARGET_GAS_LIMIT_HOLESKY);
1935+
1936+
assertThat(commandOutput.toString(UTF_8)).isEmpty();
1937+
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
1938+
}
1939+
1940+
@Test
1941+
public void holeskyTargetGasLimitIsSetToSpecifiedValueWhenValueSpecified() {
1942+
long customGasLimit = 99000000;
1943+
parseCommand("--network", "holesky", "--target-gas-limit", String.valueOf(customGasLimit));
1944+
1945+
final ArgumentCaptor<EthNetworkConfig> networkArg =
1946+
ArgumentCaptor.forClass(EthNetworkConfig.class);
1947+
1948+
final ArgumentCaptor<MiningConfiguration> miningArg =
1949+
ArgumentCaptor.forClass(MiningConfiguration.class);
1950+
1951+
verify(mockControllerBuilderFactory).fromEthNetworkConfig(networkArg.capture(), any());
1952+
verify(mockControllerBuilder).miningParameters(miningArg.capture());
1953+
verify(mockControllerBuilder).build();
1954+
1955+
assertThat(networkArg.getValue()).isEqualTo(EthNetworkConfig.getNetworkConfig(HOLESKY));
1956+
1957+
assertThat(miningArg.getValue().getCoinbase()).isEqualTo(Optional.empty());
1958+
assertThat(miningArg.getValue().getMinTransactionGasPrice()).isEqualTo(Wei.of(1000));
1959+
assertThat(miningArg.getValue().getExtraData()).isEqualTo(Bytes.EMPTY);
1960+
assertThat(miningArg.getValue().getTargetGasLimit().getAsLong()).isEqualTo(customGasLimit);
1961+
1962+
assertThat(commandOutput.toString(UTF_8)).isEmpty();
1963+
assertThat(commandErrorOutput.toString(UTF_8)).isEmpty();
1964+
}
1965+
19141966
@Test
19151967
public void luksoValuesAreUsed() {
19161968
parseCommand("--network", "lukso");

besu/src/test/java/org/hyperledger/besu/controller/MergeBesuControllerBuilderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import org.hyperledger.besu.ethereum.eth.transactions.TransactionPoolConfiguration;
5050
import org.hyperledger.besu.ethereum.mainnet.MainnetBlockHeaderFunctions;
5151
import org.hyperledger.besu.ethereum.mainnet.feemarket.BaseFeeMarket;
52-
import org.hyperledger.besu.ethereum.mainnet.feemarket.LondonFeeMarket;
52+
import org.hyperledger.besu.ethereum.mainnet.feemarket.FeeMarket;
5353
import org.hyperledger.besu.ethereum.p2p.config.NetworkingConfiguration;
5454
import org.hyperledger.besu.ethereum.storage.StorageProvider;
5555
import org.hyperledger.besu.ethereum.storage.keyvalue.KeyValueStoragePrefixedKeyBlockchainStorage;
@@ -106,7 +106,7 @@ public class MergeBesuControllerBuilderTest {
106106

107107
BigInteger networkId = BigInteger.ONE;
108108
private final BlockHeaderTestFixture headerGenerator = new BlockHeaderTestFixture();
109-
private final BaseFeeMarket feeMarket = new LondonFeeMarket(0, Optional.of(Wei.of(42)));
109+
private final BaseFeeMarket feeMarket = FeeMarket.london(0, Optional.of(Wei.of(42)));
110110
private final TransactionPoolConfiguration poolConfiguration =
111111
TransactionPoolConfiguration.DEFAULT;
112112
private final ObservableMetricsSystem observableMetricsSystem = new NoOpMetricsSystem();

config/src/main/java/org/hyperledger/besu/config/BlobScheduleOptions.java

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,16 @@ public Map<String, Object> asMap() {
8282
public static class BlobSchedule {
8383
private final int target;
8484
private final int max;
85+
private final int baseFeeUpdateFraction;
8586

8687
/** The constant CANCUN_DEFAULT. */
87-
public static final BlobSchedule CANCUN_DEFAULT = new BlobSchedule(3, 6);
88+
public static final BlobSchedule CANCUN_DEFAULT = new BlobSchedule(3, 6, 3338477);
8889

8990
/** The constant PRAGUE_DEFAULT. */
90-
public static final BlobSchedule PRAGUE_DEFAULT = new BlobSchedule(6, 9);
91+
public static final BlobSchedule PRAGUE_DEFAULT = new BlobSchedule(6, 9, 5007716);
9192

9293
/** The constant OSAKA_DEFAULT. */
93-
public static final BlobSchedule OSAKA_DEFAULT = new BlobSchedule(9, 12);
94+
public static final BlobSchedule OSAKA_DEFAULT = new BlobSchedule(9, 12, 5007716);
9495

9596
/**
9697
* Instantiates a new Blob schedule.
@@ -100,11 +101,14 @@ public static class BlobSchedule {
100101
public BlobSchedule(final ObjectNode blobScheduleConfigRoot) {
101102
this.target = JsonUtil.getInt(blobScheduleConfigRoot, "target").orElseThrow();
102103
this.max = JsonUtil.getInt(blobScheduleConfigRoot, "max").orElseThrow();
104+
this.baseFeeUpdateFraction =
105+
JsonUtil.getInt(blobScheduleConfigRoot, "basefeeupdatefraction").orElseThrow();
103106
}
104107

105-
private BlobSchedule(final int target, final int max) {
108+
private BlobSchedule(final int target, final int max, final int baseFeeUpdateFraction) {
106109
this.target = target;
107110
this.max = max;
111+
this.baseFeeUpdateFraction = baseFeeUpdateFraction;
108112
}
109113

110114
/**
@@ -125,13 +129,22 @@ public int getMax() {
125129
return max;
126130
}
127131

132+
/**
133+
* Gets base fee update fraction.
134+
*
135+
* @return the base fee update fraction
136+
*/
137+
public int getBaseFeeUpdateFraction() {
138+
return baseFeeUpdateFraction;
139+
}
140+
128141
/**
129142
* As map.
130143
*
131144
* @return the map
132145
*/
133146
Map<String, Object> asMap() {
134-
return Map.of("target", target, "max", max);
147+
return Map.of("target", target, "max", max, "baseFeeUpdateFraction", baseFeeUpdateFraction);
135148
}
136149
}
137150
}

config/src/main/resources/holesky.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@
1515
"terminalTotalDifficulty": 0,
1616
"shanghaiTime": 1696000704,
1717
"cancunTime": 1707305664,
18+
"blobSchedule": {
19+
"cancun": {
20+
"target": 3,
21+
"max": 6,
22+
"baseFeeUpdateFraction": 3338477
23+
},
24+
"prague": {
25+
"target": 6,
26+
"max": 9,
27+
"baseFeeUpdateFraction": 5007716
28+
}
29+
},
1830
"ethash": {},
1931
"discovery": {
2032
"dns": "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.holesky.ethdisco.net",

config/src/main/resources/mainnet.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@
1919
"blobSchedule": {
2020
"cancun": {
2121
"target": 3,
22-
"max": 6
22+
"max": 6,
23+
"baseFeeUpdateFraction": 3338477
2324
},
2425
"prague": {
2526
"target": 6,
26-
"max": 9
27+
"max": 9,
28+
"baseFeeUpdateFraction": 5007716
2729
}
2830
},
2931
"ethash": {

config/src/main/resources/sepolia.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@
1515
"terminalTotalDifficulty": 17000000000000000,
1616
"shanghaiTime": 1677557088,
1717
"cancunTime": 1706655072,
18+
"blobSchedule": {
19+
"cancun": {
20+
"target": 3,
21+
"max": 6,
22+
"baseFeeUpdateFraction": 3338477
23+
},
24+
"prague": {
25+
"target": 6,
26+
"max": 9,
27+
"baseFeeUpdateFraction": 5007716
28+
}
29+
},
1830
"ethash":{},
1931
"discovery": {
2032
"dns": "enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net",

0 commit comments

Comments
 (0)