Skip to content

Commit 00b587f

Browse files
committed
merge
Signed-off-by: Sally MacFarlane <[email protected]>
2 parents ea322de + 23de075 commit 00b587f

File tree

130 files changed

+2631
-1493
lines changed

Some content is hidden

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

130 files changed

+2631
-1493
lines changed

.github/workflows/BesuContainerVerify.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fi
3838
_SUCCESS=false
3939
while [[ ${_SUCCESS} != "true" && $RETRY -gt 0 ]]
4040
do
41-
docker logs ${CONTAINER_NAME} | grep -q "Ethereum main loop is up" && {
41+
docker logs ${CONTAINER_NAME} 2>&1 | grep -q "Ethereum main loop is up" && {
4242
_SUCCESS=true
4343
continue
4444
}

.github/workflows/develop-pr.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,6 @@ jobs:
7373
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
7474
with:
7575
cache-disabled: true
76-
- name: install goss
77-
run: |
78-
mkdir -p docker/reports
79-
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.4.4/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} -o ./docker/tests/goss-${{ steps.prep.outputs.PLATFORM_PAIR }}
8076
- name: build and test docker
8177
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
8278
env:

.github/workflows/develop.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@ jobs:
7272
uses: gradle/actions/setup-gradle@9e899d11ad247ec76be7a60bc1cf9d3abbb9e7f1
7373
with:
7474
cache-disabled: true
75-
- name: install goss
76-
run: |
77-
mkdir -p docker/reports
78-
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.4.4/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} -o ./docker/tests/goss-${{ steps.prep.outputs.PLATFORM_PAIR }}
7975
- name: login to ${{ env.registry }}
8076
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
8177
with:

.github/workflows/draft-release.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,6 @@ jobs:
226226
with:
227227
cache-disabled: true
228228

229-
- name: install goss
230-
run: |
231-
mkdir -p docker/reports
232-
curl -L https://github.com/aelsabbahy/goss/releases/download/v0.4.4/goss-${{ steps.prep.outputs.PLATFORM_PAIR }} -o ./docker/tests/goss-${{ steps.prep.outputs.PLATFORM_PAIR }}
233-
234229
- name: login to ${{ env.registry }}
235230
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d
236231
with:

.github/workflows/stale-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
pull-requests: write
1212
contents: write
1313
steps:
14-
- uses: actions/stale@v10.1.0
14+
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008
1515
with:
1616
days-before-issue-stale: 180
1717
days-before-issue-close: 14

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
.settings
2020
.springBeans
2121
.vertx
22+
.profileconfig.json
2223
bin/
2324
local.properties
2425
target/
@@ -32,3 +33,4 @@ site/
3233
jitpack.yml
3334
/ethereum/eth/src/test/resources/tx.csv.gz
3435
**/**/.factorypath
36+
**/**/.jqwik-database

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,29 @@
33
## Unreleased
44

55
### Breaking Changes
6+
- Remove these deprecated CLI options [#9385](https://github.com/hyperledger/besu/pull/9385)
7+
- Remove`--Xbonsai-parallel-tx-processing-enabled` deprecated since 25.7.0. Use `--bonsai-parallel-tx-processing-enabled` instead.
8+
- Remove `--Xsnapsync-server-enabled` deprecated since 25.7.0. Use `--snapsync-server-enabled` instead.
9+
- Remove `--Xsnapsync-synchronizer-pre-merge-headers-only-enabled` deprecated since 25.7.0. Use `--snapsync-synchronizer-pre-checkpoint-headers-only-enabled` instead.
10+
- Remove `--Xhistory-expiry-prune` deprecated since 25.7.0. Use `--history-expiry-prune` instead.
611
- eth_createAccessList now returns success result if execution reverted [#9358](https://github.com/hyperledger/besu/pull/9358)
712

13+
### Upcoming Breaking Changes
14+
- 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)
15+
- Proof of Work consensus (PoW)
16+
- Fast Sync
17+
18+
### Additions and Improvements
19+
- Update to vertx 4.5.22 [#9375](https://github.com/hyperledger/besu/pull/9375)
20+
- Add `opcodes` optional parameter to RPC methods: `debug_standardTraceBlockToFile`, `debug_standardTraceBadBlockToFile`, `debug_traceBlockByNumber`, `debug_traceBlockByHash`, `debug_traceTransaction`, `debug_traceBlock`, `debug_traceCall` for tracing specified opcodes [#9335](https://github.com/hyperledger/besu/pull/9335)
21+
- eth_createAccessList now returns success result if execution reverted [#9358](https://github.com/hyperledger/besu/pull/9358)
22+
23+
### Bug fixes
24+
25+
## 25.11.0
26+
27+
### Breaking Changes
28+
829
### Upcoming Breaking Changes
930
- Deprecated CLI options
1031
- `--Xbonsai-parallel-tx-processing-enabled` is deprecated since 25.7.0. Use `--bonsai-parallel-tx-processing-enabled` instead.
@@ -16,13 +37,13 @@
1637
- Fast Sync
1738

1839
### Additions and Improvements
40+
- Add Osaka, BPO1 and BPO2 fork times for mainnet [#9380](https://github.com/hyperledger/besu/pull/9380)
1941
- Add blockTimestamp to receipt logs for `eth_getBlockReceipts` and `eth_getTransactionReceipt` results [#9294](https://github.com/hyperledger/besu/pull/9294)
2042
- Upgrade to execution-spec-tests v5.3.0 [#9301](https://github.com/hyperledger/besu/pull/9301)
2143
- Update to netty 4.2.7.Final [#9330](https://github.com/hyperledger/besu/pull/9330)
2244
- Ability to enable/disable stack, storage and returnData tracing data in debug_traceStandardBlockToFile and debug_traceStandardBadBlockToFile endpoints [#9183](https://github.com/hyperledger/besu/pull/9183)
2345
- Increase mainnet gas limit to 60M [#9339](https://github.com/hyperledger/besu/pull/9339)
2446
- Update to tuweni 2.7.2 [#9338](https://github.com/hyperledger/besu/pull/9338)
25-
- eth_createAccessList now returns success result if execution reverted [#9358](https://github.com/hyperledger/besu/pull/9358)
2647

2748
### Bug fixes
2849

acceptance-tests/test-plugins/src/main/java/org/hyperledger/besu/tests/acceptance/plugins/TestBesuEventsPlugin.java

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import org.hyperledger.besu.plugin.BesuPlugin;
1818
import org.hyperledger.besu.plugin.ServiceManager;
19+
import org.hyperledger.besu.plugin.data.AddedBlockContext;
1920
import org.hyperledger.besu.plugin.data.BlockHeader;
2021
import org.hyperledger.besu.plugin.data.PropagatedBlockContext;
2122
import org.hyperledger.besu.plugin.services.BesuEvents;
@@ -37,8 +38,10 @@ public class TestBesuEventsPlugin implements BesuPlugin {
3738

3839
private ServiceManager context;
3940

40-
private Optional<Long> subscriptionId;
41-
private final AtomicInteger blockCounter = new AtomicInteger();
41+
private Optional<Long> propagationSubscriptionId;
42+
private Optional<Long> addedSubscriptionId;
43+
private final AtomicInteger propagatedBlockCounter = new AtomicInteger();
44+
private final AtomicInteger addedBlockCounter = new AtomicInteger();
4245
private File callbackDir;
4346

4447
@Override
@@ -50,26 +53,37 @@ public void register(final ServiceManager context) {
5053

5154
@Override
5255
public void start() {
53-
subscriptionId =
56+
propagationSubscriptionId =
5457
context
5558
.getService(BesuEvents.class)
5659
.map(events -> events.addBlockPropagatedListener(this::onBlockAnnounce));
57-
LOG.info("Listening with ID#" + subscriptionId);
60+
LOG.info("Listening with propagation ID#" + propagationSubscriptionId);
61+
addedSubscriptionId =
62+
context
63+
.getService(BesuEvents.class)
64+
.map(events -> events.addBlockAddedListener(this::onBlockAdded));
65+
LOG.info("Listening with added ID#" + addedSubscriptionId);
5866
}
5967

6068
@Override
6169
public void stop() {
62-
subscriptionId.ifPresent(
70+
propagationSubscriptionId.ifPresent(
6371
id ->
6472
context
6573
.getService(BesuEvents.class)
6674
.ifPresent(besuEvents -> besuEvents.removeBlockPropagatedListener(id)));
67-
LOG.info("No longer listening with ID#" + subscriptionId);
75+
LOG.info("No longer listening propagation with ID#" + propagationSubscriptionId);
76+
addedSubscriptionId.ifPresent(
77+
id ->
78+
context
79+
.getService(BesuEvents.class)
80+
.ifPresent(besuEvents -> besuEvents.removeBlockAddedListener(id)));
81+
LOG.info("No longer listening added with ID#" + addedSubscriptionId);
6882
}
6983

7084
private void onBlockAnnounce(final PropagatedBlockContext propagatedBlockContext) {
7185
final BlockHeader header = propagatedBlockContext.getBlockHeader();
72-
final int blockCount = blockCounter.incrementAndGet();
86+
final int blockCount = propagatedBlockCounter.incrementAndGet();
7387
LOG.info("I got a new block! (I've seen {}) - {}", blockCount, header);
7488
try {
7589
final File callbackFile = new File(callbackDir, "newBlock." + blockCount);
@@ -83,4 +97,27 @@ private void onBlockAnnounce(final PropagatedBlockContext propagatedBlockContext
8397
throw new RuntimeException(ioe);
8498
}
8599
}
100+
101+
private void onBlockAdded(final AddedBlockContext addedBlockContext) {
102+
final BlockHeader header = addedBlockContext.getBlockHeader();
103+
final int blockCount = addedBlockCounter.incrementAndGet();
104+
LOG.info(
105+
"New block added! (I've seen {}) - {}, eventType {}",
106+
blockCount,
107+
header,
108+
addedBlockContext.getEventType());
109+
try {
110+
final File callbackFile = new File(callbackDir, "addedBlock." + blockCount);
111+
if (!callbackFile.getParentFile().exists()) {
112+
callbackFile.getParentFile().mkdirs();
113+
callbackFile.getParentFile().deleteOnExit();
114+
}
115+
Files.write(
116+
callbackFile.toPath(),
117+
Collections.singletonList(addedBlockContext.getEventType().name()));
118+
callbackFile.deleteOnExit();
119+
} catch (final IOException ioe) {
120+
throw new RuntimeException(ioe);
121+
}
122+
}
86123
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright contributors to Besu.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5+
* the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
10+
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11+
* specific language governing permissions and limitations under the License.
12+
*
13+
* SPDX-License-Identifier: Apache-2.0
14+
*/
15+
package org.hyperledger.besu.tests.acceptance.plugins;
16+
17+
import org.hyperledger.besu.tests.acceptance.dsl.AcceptanceTestBase;
18+
import org.hyperledger.besu.tests.acceptance.dsl.node.BesuNode;
19+
import org.hyperledger.besu.tests.acceptance.dsl.node.configuration.genesis.GenesisConfigurationFactory;
20+
21+
import java.util.Collections;
22+
23+
import org.junit.jupiter.api.BeforeEach;
24+
import org.junit.jupiter.api.Test;
25+
26+
public class BesuEventsPluginTest extends AcceptanceTestBase {
27+
private BesuNode pluginNode;
28+
private BesuNode minerNode;
29+
30+
@BeforeEach
31+
public void setUp() throws Exception {
32+
minerNode =
33+
besu.createQbftNode(
34+
"minerNode",
35+
b ->
36+
b.genesisConfigProvider(
37+
GenesisConfigurationFactory::createQbftLondonGenesisConfig));
38+
pluginNode =
39+
besu.createQbftPluginsNode(
40+
"node1", Collections.singletonList("testPlugins"), Collections.emptyList());
41+
cluster.start(pluginNode, minerNode);
42+
}
43+
44+
@Test
45+
public void blockIsAdded() {
46+
waitForFile(pluginNode.homeDirectory().resolve("plugins/addedBlock.2"));
47+
}
48+
}

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

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -771,16 +771,6 @@ protected BesuCommand(
771771
this.transactionValidatorServiceImpl = transactionValidatorServiceImpl;
772772
}
773773

774-
/**
775-
* Parse Besu command line arguments. Visible for testing.
776-
*
777-
* @param resultHandler execution strategy. See PicoCLI. Typical argument is RunLast.
778-
* @param parameterExceptionHandler Exception handler for handling parameters
779-
* @param executionExceptionHandler Exception handler for business logic
780-
* @param in Standard input stream
781-
* @param args arguments to Besu command
782-
* @return success or failure exit code.
783-
*/
784774
/**
785775
* Parses command line arguments and configures the application accordingly.
786776
*
@@ -792,6 +782,7 @@ protected BesuCommand(
792782
* @param args The command line arguments.
793783
* @return The execution result status code.
794784
*/
785+
@VisibleForTesting
795786
public int parse(
796787
final IExecutionStrategy resultHandler,
797788
final BesuParameterExceptionHandler parameterExceptionHandler,

0 commit comments

Comments
 (0)