Skip to content

Commit 59d66a4

Browse files
committed
Merge branch 'main' of github.com:hyperledger/besu into fix-eth-simulate-error-codes
2 parents 85a3d20 + 6d1396d commit 59d66a4

File tree

287 files changed

+3053
-1375
lines changed

Some content is hidden

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

287 files changed

+3053
-1375
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: bft-soak-test
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
soak-time-mins:
6+
description: 'Duration of soak test in minutes (minimum 60)'
7+
required: false
8+
default: '60'
9+
type: string
10+
11+
env:
12+
GRADLE_OPTS: "-Xmx6g -Dorg.gradle.daemon=false -Dorg.gradle.parallel=true"
13+
14+
jobs:
15+
bft-soak-test:
16+
name: "BFT Soak Test"
17+
runs-on: ubuntu-22.04
18+
timeout-minutes: 180
19+
permissions:
20+
statuses: write
21+
checks: write
22+
steps:
23+
- name: Checkout Repo
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
25+
with:
26+
ref: ${{ github.ref }}
27+
- name: Set up Java
28+
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00
29+
with:
30+
distribution: temurin
31+
java-version: 21
32+
- name: setup gradle
33+
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
34+
with:
35+
cache-disabled: true
36+
- name: run BFT soak test
37+
run: ./gradlew :acceptance-tests:tests:acceptanceTestBftSoak -Dacctests.soakTimeMins=${{ inputs['soak-time-mins'] }}
38+
- name: Upload BFT Soak Test HTML Reports
39+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
40+
if: always()
41+
with:
42+
name: bft-soak-test-html-reports
43+
path: 'acceptance-tests/tests/build/reports/tests/**'
44+
- name: Upload BFT Soak Test Results
45+
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3
46+
if: always()
47+
with:
48+
name: bft-soak-test-results
49+
path: 'acceptance-tests/tests/build/test-results/**/TEST-*.xml'

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- eth_simulateV1 returns BLOCK_NOT_FOUND instead of null success response when called with a future block [#9837](https://github.com/hyperledger/besu/pull/9837)
88
- eth_simulateV1: when validation is enabled, map UPFRONT_COST_EXCEEDS_BALANCE (-38014) error code to -32602 [#9837](https://github.com/hyperledger/besu/pull/9837)
99
- Forest db subcommands `x-backup-state` and `x-restore-state` are removed [#9821](https://github.com/hyperledger/besu/pull/9821)
10+
- Omit totalDifficulty from post-merge blockResults [#9836](https://github.com/hyperledger/besu/pull/9836)
1011
- **Chain pruning CLI options have been redesigned with new behavior:** [#9637](https://github.com/hyperledger/besu/pull/9637)
1112
- `--Xchain-pruning-enabled` now accepts three strategy values instead of boolean:
1213
- `ALL` - prunes both blocks and BALs (replaces the old `--Xchain-pruning-enabled=true`)
@@ -47,6 +48,7 @@
4748

4849
#### Performance
4950
- EVM optimisations - Improves 70% of EEST benchmarks [#9775](https://github.com/hyperledger/besu/pull/9775)
51+
- EVM optimisations - Improve SAR, SHR and SHL opcodes performance [#9796](https://github.com/hyperledger/besu/pull/9796)
5052

5153
### Bug fixes
5254
- Fix QBFT Shanghai support by reintroducing NotApplicableWithdrawals withdrawals validator [#9830](https://github.com/hyperledger/besu/pull/9830)

acceptance-tests/tests/build.gradle

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,30 @@ testing {
112112

113113
acceptanceTestBftSoak {
114114
testTask.configure {
115+
// Clear the exclude inherited from the 'all' block
116+
excludes.clear()
115117
include '**/bftsoak/**'
116118

119+
dependsOn(rootProject.installDist)
120+
setSystemProperties(getSystemProperties())
121+
systemProperty 'acctests.runBesuAsProcess', 'true'
122+
systemProperty 'java.security.properties', "${buildDir}/resources/acceptanceTest/acceptanceTesting.security"
117123
// Set to any time > 60 minutes to run the soak test for longer
118124
// systemProperty 'acctests.soakTimeMins', '120'
119125
description = 'Runs BFT soak test.'
126+
group = 'verification'
127+
128+
jvmArgs "-XX:ErrorFile=${buildDir}/jvmErrorLogs/java_err_pid%p.log"
120129

121130
testLogging {
131+
exceptionFormat = 'full'
132+
showStackTraces = true
122133
showStandardStreams = true
134+
showExceptions = true
135+
showCauses = true
123136
}
137+
138+
doFirst { mkdir "${buildDir}/jvmErrorLogs" }
124139
}
125140
}
126141
}

acceptance-tests/tests/src/acceptanceTest/java/org/hyperledger/besu/tests/acceptance/bft/BftSyncAcceptanceTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,6 @@ public void shouldSyncValidatorNode(
8080
// Add validator4 to cluster and start
8181
cluster.addNode(validator4);
8282

83-
validator4.verify(blockchain.minimumHeight(TARGET_BLOCK_HEIGHT, 120));
83+
validator4.verify(blockchain.minimumHeight(TARGET_BLOCK_HEIGHT, 140));
8484
}
8585
}

acceptance-tests/tests/src/acceptanceTest/java/org/hyperledger/besu/tests/acceptance/ethereum/EIP7708TransferLogAcceptanceTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
*
5858
* <ul>
5959
* <li>SELFDESTRUCT to different address: Transfer log (LOG3) with 3 topics
60-
* <li>SELFDESTRUCT to self: Selfdestruct log (LOG2) with 2 topics
60+
* <li>SELFDESTRUCT to self: Burn log (LOG2) with 2 topics
6161
* </ul>
6262
*/
6363
public class EIP7708TransferLogAcceptanceTest extends AcceptanceTestBase {
@@ -67,8 +67,8 @@ public class EIP7708TransferLogAcceptanceTest extends AcceptanceTestBase {
6767
private static final String EIP7708_SYSTEM_ADDRESS = "0xfffffffffffffffffffffffffffffffffffffffe";
6868
private static final String TRANSFER_TOPIC =
6969
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef";
70-
private static final String SELFDESTRUCT_TOPIC =
71-
"0x4bfaba3443c1a1836cd362418edc679fc96cae8449cbefccb6457cdf2c943083";
70+
private static final String BURN_TOPIC =
71+
"0xcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5";
7272

7373
private final Account sender =
7474
accounts.createAccount(
@@ -344,7 +344,7 @@ public void shouldEmitTransferLogForSelfDestructToDifferentAddress() throws IOEx
344344
*
345345
* <p>Per EIP-7708, since no actual destruction or value transfer occurs, no log should be
346346
* emitted. This is different from pre-Cancun behavior where the contract would be destroyed and a
347-
* Selfdestruct log would be emitted.
347+
* Burn log would be emitted.
348348
*/
349349
@Test
350350
public void shouldNotEmitLogForPreExistingContractSelfDestructToSelf() throws IOException {
@@ -497,7 +497,7 @@ public void shouldNotEmitTransferLogForRevertedTransaction() throws IOException
497497
}
498498

499499
/**
500-
* Test that SELFDESTRUCT to SELF for a same-tx-created contract DOES emit a Selfdestruct log.
500+
* Test that SELFDESTRUCT to SELF for a same-tx-created contract DOES emit a Burn log.
501501
*
502502
* <p>This test calls a factory contract (0x7710) that:
503503
*
@@ -508,8 +508,8 @@ public void shouldNotEmitTransferLogForRevertedTransaction() throws IOException
508508
* </ol>
509509
*
510510
* <p>Under EIP-6780, contracts created in the same transaction CAN be destroyed by SELFDESTRUCT.
511-
* Per EIP-7708, when a same-tx-created contract selfdestructs to itself, a Selfdestruct log
512-
* (LOG2) should be emitted with the destroyed balance.
511+
* Per EIP-7708, when a same-tx-created contract selfdestructs to itself, a Burn log (LOG2) should
512+
* be emitted with the destroyed balance.
513513
*/
514514
@Test
515515
public void shouldEmitSelfdestructLogForSameTxCreatedContractSelfDestructToSelf()
@@ -552,18 +552,18 @@ public void shouldEmitSelfdestructLogForSameTxCreatedContractSelfDestructToSelf(
552552

553553
final List<Log> logs = receipt.getLogs();
554554

555-
// Should have at least one Selfdestruct log (LOG2 with 2 topics)
555+
// Should have at least one Burn log (LOG2 with 2 topics)
556556
final List<Log> selfdestructLogs =
557557
logs.stream()
558558
.filter(log -> log.getTopics().size() == 2)
559-
.filter(log -> log.getTopics().get(0).equalsIgnoreCase(SELFDESTRUCT_TOPIC))
559+
.filter(log -> log.getTopics().get(0).equalsIgnoreCase(BURN_TOPIC))
560560
.toList();
561561

562562
assertThat(selfdestructLogs)
563-
.as("Same-tx-created contract SELFDESTRUCT to self SHOULD emit a Selfdestruct log")
563+
.as("Same-tx-created contract SELFDESTRUCT to self SHOULD emit a Burn log")
564564
.isNotEmpty();
565565

566-
// Verify the Selfdestruct log has the correct balance
566+
// Verify the Burn log has the correct balance
567567
final Log selfdestructLog = selfdestructLogs.getFirst();
568568
assertThat(selfdestructLog.getAddress()).isEqualToIgnoringCase(EIP7708_SYSTEM_ADDRESS);
569569
assertThat(selfdestructLog.getData())

acceptance-tests/tests/src/acceptanceTest/resources/jsonrpc/debug/replayBlock/test-cases/05_get_latest_block.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
1919
"miner": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
2020
"difficulty": "0x0",
21-
"totalDifficulty": "0x400000000",
2221
"extraData": "0x",
2322
"baseFeePerGas": "0x7",
2423
"size": "0x1fa",

acceptance-tests/tests/src/acceptanceTest/resources/jsonrpc/debug/replayBlock/test-cases/07_get_latest_block_after_replay_block.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"receiptsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
1919
"miner" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
2020
"difficulty" : "0x0",
21-
"totalDifficulty" : "0x400000000",
2221
"extraData" : "0x",
2322
"baseFeePerGas" : "0x7",
2423
"size" : "0x1fa",

acceptance-tests/tests/src/acceptanceTest/resources/jsonrpc/debug/setHead/test-cases/05_get_latest_block.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
1919
"miner": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
2020
"difficulty": "0x0",
21-
"totalDifficulty": "0x400000000",
2221
"extraData": "0x",
2322
"baseFeePerGas": "0x7",
2423
"size": "0x1fa",

acceptance-tests/tests/src/acceptanceTest/resources/jsonrpc/debug/setHead/test-cases/07_get_latest_block_after_set_head.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
"receiptsRoot" : "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
1919
"miner" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",
2020
"difficulty" : "0x0",
21-
"totalDifficulty" : "0x400000000",
2221
"extraData" : "0x",
2322
"baseFeePerGas" : "0x7",
2423
"size" : "0x1fa",

acceptance-tests/tests/src/acceptanceTest/resources/jsonrpc/engine/cancun/test-cases/block-production/09_cancun_get_chainhead.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
"receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
2525
"miner": "0x0000000000000000000000000000000000000000",
2626
"difficulty": "0x0",
27-
"totalDifficulty": "0x0",
2827
"extraData": "0x",
2928
"baseFeePerGas": "0x3b9aca00",
3029
"size": "0x244",

0 commit comments

Comments
 (0)