Skip to content

Commit

Permalink
spotless
Browse files Browse the repository at this point in the history
Signed-off-by: Justin Florentine <justin+github@florentine.us>
  • Loading branch information
jflo committed Sep 30, 2024
2 parents ea0bfe8 + c3aa3f4 commit 8d996f2
Show file tree
Hide file tree
Showing 32 changed files with 498 additions and 152 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Changelog

## [Unreleased]
- Add configuration of Consolidation Request Contract Address via genesis configuration [#7647](https://github.com/hyperledger/besu/pull/7647)


### Upcoming Breaking Changes
- k8s (KUBERNETES) Nat method is now deprecated and will be removed in a future release
Expand All @@ -14,7 +12,9 @@
- Remove privacy test classes support [#7569](https://github.com/hyperledger/besu/pull/7569)
- Add Blob Transaction Metrics [#7622](https://github.com/hyperledger/besu/pull/7622)
- Implemented support for emptyBlockPeriodSeconds in QBFT [#6965](https://github.com/hyperledger/besu/pull/6965)

- LUKSO Cancun Hardfork [#7686](https://github.com/hyperledger/besu/pull/7686)
- Add configuration of Consolidation Request Contract Address via genesis configuration [#7647](https://github.com/hyperledger/besu/pull/7647)
- Interrupt pending transaction processing on block creation timeout [#7673](https://github.com/hyperledger/besu/pull/7673)

### Bug fixes
- Fix mounted data path directory permissions for besu user [#7575](https://github.com/hyperledger/besu/pull/7575)
Expand Down
2 changes: 1 addition & 1 deletion MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The following steps must occur for a contributor to be "upgraded" as a maintaine
- The proposed maintainer accepts the nomination and expresses a willingness
to be a long-term (more than 6 month) committer by adding a comment in the proposal PR.
- The PR will be communicated in all appropriate communication channels
including at least [besu-contributors channel on Hyperledger Discord](https://discord.gg/hyperledger),
including at least [besu-contributors channel on Discord](https://discord.gg/hyperledger),
the [mailing list](https://lists.hyperledger.org/g/besu)
and any maintainer/community call.
- Approval by at least 3 current maintainers within two weeks of the proposal or
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Besu is an Apache 2.0 licensed, MainNet compatible, Ethereum client written in J

* [Besu User Documentation]
* [Besu Issues]
* [Besu Wiki](https://wiki.hyperledger.org/display/BESU/Hyperledger+Besu)
* [Besu Wiki](https://wiki.hyperledger.org/display/BESU/Besu)
* [How to Contribute to Besu](https://wiki.hyperledger.org/display/BESU/How+to+Contribute)
* [Besu Roadmap & Planning](https://wiki.hyperledger.org/pages/viewpage.action?pageId=24781786)

Expand Down
10 changes: 5 additions & 5 deletions SUPPORT.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Hyperledger Besu Support
# Besu Support

Welcome to the Besu repository! The following links are a set of guidelines for contributing to this repo and its packages. These are mostly guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request. Contributions come in the form of code submissions, writing documentation, raising issues, helping others in chat, and any other actions that help develop Besu.

### Github/Discord/LF Accounts

Having Github, Discord, and Linux Foundation accounts is necessary for obtaining support for Besu through the community channels, wiki and issue management.
* If you want to raise an issue, you can do so [on the github issue tab](https://github.com/hyperledger/besu/issues).
* Hyperledger Discord requires a [Discord account].
* The Hyperledger wiki also requires a [Linux Foundation (LF) account] in order to edit pages.
* Discord requires a [Discord account].
* The Besu wiki also requires a [Linux Foundation (LF) account] in order to edit pages.

### Useful support links

* [Besu User Documentation]
* [Besu channel on Hyperledger Discord]
* [Besu channel on Discord]
* [I just have a quick question](https://wiki.hyperledger.org/display/BESU/I+just+have+a+quick+question)
* [Did you find a bug?](https://wiki.hyperledger.org/display/BESU/Reporting+Bugs)
* [Issues](https://wiki.hyperledger.org/display/BESU/Issues)
* [Contributing Guidelines]


[Besu User Documentation]: https://besu.hyperledger.org
[Besu channel on Hyperledger Discord]: https://discord.gg/hyperledger
[Besu channel on Discord]: https://discord.gg/hyperledger
[Contributing Guidelines]: CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,11 @@ public List<String> getCLIOptions() {
arity = "1")
private String metricsPrometheusJob = "besu-client";

/** Returns a newly created {@link MetricsOptions} with default values.
/**
* Returns a newly created {@link MetricsOptions} with default values.
*
* @return new instance
*/

public static MetricsOptions create() {
return new MetricsOptions();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,10 @@ public void shouldCreateIbft2ExtraData() throws IOException {
false,
singletonList("key.pub"),
Optional.empty(),
Optional.of(
"0xf853a00000000000000000000000000000000000000000000000000000000000000000ea94d5feb0fc5a54a89f97aeb34c3df15397c19f6dd294d6a9a4c886eb008ac307abdc1f38745c1dd13a88808400000000c0"));
List.of(
new Field(
"extraData",
"0xf853a00000000000000000000000000000000000000000000000000000000000000000ea94d5feb0fc5a54a89f97aeb34c3df15397c19f6dd294d6a9a4c886eb008ac307abdc1f38745c1dd13a88808400000000c0")));
}

@Test
Expand All @@ -296,8 +298,49 @@ public void shouldCreateQbftExtraData() throws IOException {
false,
singletonList("key.pub"),
Optional.empty(),
Optional.of(
"0xf84fa00000000000000000000000000000000000000000000000000000000000000000ea94d5feb0fc5a54a89f97aeb34c3df15397c19f6dd294d6a9a4c886eb008ac307abdc1f38745c1dd13a88c080c0"));
List.of(
new Field(
"extraData",
"0xf84fa00000000000000000000000000000000000000000000000000000000000000000ea94d5feb0fc5a54a89f97aeb34c3df15397c19f6dd294d6a9a4c886eb008ac307abdc1f38745c1dd13a88c080c0")));
}

@Test
public void generatedGenesisFileShouldContainAllOriginalFieldsExcludingExtraData()
throws IOException {
final JsonObject alloc =
new JsonObject(
"""
{
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
},
"2a813d7db3de19b07f92268b6d4125ed295cbe00": {
"balance": "0x446c3b15f9926687d2c40534fdb542000000000000"
}
}""");
final List<Field> fields =
List.of(
new Field("nonce", "0x0"),
new Field("timestamp", "0x5b3c3d18"),
new Field("gasUsed", "0x0"),
new Field(
"parentHash", "0x0000000000000000000000000000000000000000000000000000000000000000"),
new Field("gasLimit", "0x47b760"),
new Field("difficulty", "0x1"),
new Field(
"mixHash", "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365"),
new Field("coinbase", "0x0000000000000000000000000000000000000000"),
new Field("alloc", alloc.getMap().toString()));

runCmdAndCheckOutput(
cmd(),
"/operator/config_generate_keys.json",
tmpOutputDirectoryPath,
"genesis.json",
false,
singletonList("key.pub"),
Optional.empty(),
fields);
}

private void runCmdAndCheckOutput(
Expand All @@ -316,7 +359,7 @@ private void runCmdAndCheckOutput(
generate,
expectedKeyFiles,
Optional.empty(),
Optional.empty());
List.of());
}

private void runCmdAndCheckOutput(
Expand All @@ -336,9 +379,11 @@ private void runCmdAndCheckOutput(
generate,
expectedKeyFiles,
signatureAlgorithm,
Optional.empty());
List.of());
}

private record Field(String key, String value) {}

private void runCmdAndCheckOutput(
final Cmd cmd,
final String configFile,
Expand All @@ -347,7 +392,7 @@ private void runCmdAndCheckOutput(
final boolean generate,
final Collection<String> expectedKeyFiles,
final Optional<SignatureAlgorithm> signatureAlgorithm,
final Optional<String> expectedExtraData)
final List<Field> expectedFields)
throws IOException {
final URL configFilePath = this.getClass().getResource(configFile);
parseCommand(
Expand All @@ -368,8 +413,9 @@ private void runCmdAndCheckOutput(
final String genesisString = contentOf(outputGenesisFile, UTF_8);
final JsonObject genesisContent = new JsonObject(genesisString);
assertThat(genesisContent.containsKey("extraData")).isTrue();
expectedExtraData.ifPresent(
extraData -> assertThat(genesisContent.getString("extraData")).isEqualTo(extraData));

expectedFields.forEach(
field -> assertThat(genesisContent.getString(field.key)).isEqualTo(field.value));

final Path expectedKeysPath = outputDirectoryPath.resolve("keys");
final File keysDirectory = new File(expectedKeysPath.toUri());
Expand Down
9 changes: 3 additions & 6 deletions besu/src/test/resources/operator/config_generate_keys.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"chainId": 2017,
"eip150Block": 0,
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -16,11 +18,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"eip150Block": 0,
"ecCurve": "abcd",
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -17,11 +19,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"eip150Block": 0,
"ecCurve": "secp256r1",
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -17,11 +19,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
9 changes: 3 additions & 6 deletions besu/src/test/resources/operator/config_import_keys.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"chainId": 2017,
"petersburgBlock": 0,
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -16,11 +18,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"chainId": 2017,
"petersburgBlock": 0,
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -16,11 +18,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
9 changes: 3 additions & 6 deletions besu/src/test/resources/operator/config_import_keys_qbft.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"chainId": 2017,
"petersburgBlock": 0,
"qbft": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -16,11 +18,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"petersburgBlock": 0,
"ecCurve": "secp256r1",
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -17,11 +19,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"petersburgBlock": 0,
"ecCurve": "secp256r1",
"ibft2": {

"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
}
},
"nonce": "0x0",
Expand All @@ -17,11 +19,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
"difficulty": "0x1",
"mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",
"coinbase": "0x0000000000000000000000000000000000000000",
"ibft2": {
"blockperiodseconds": 2,
"epochlength": 30000,
"requesttimeoutseconds": 10
},
"alloc": {
"24defc2d149861d3d245749b81fe0e6b28e04f31": {
"balance": "0x446c3b15f9926687d2c40534fdb564000000000000"
Expand Down
Loading

0 comments on commit 8d996f2

Please sign in to comment.