Skip to content

Commit

Permalink
Merge branch 'main' into qbft-rc-quorum
Browse files Browse the repository at this point in the history
  • Loading branch information
macfarla authored Dec 17, 2024
2 parents 42fc935 + 4aa89b2 commit 931e12c
Show file tree
Hide file tree
Showing 12 changed files with 136 additions and 84 deletions.
23 changes: 12 additions & 11 deletions .github/ISSUE_TEMPLATE/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,36 @@ assignees: ''
- [ ] Optional: for hotfixes, create a release branch and cherry-pick, e.g. `release-<version>-hotfix`
- [ ] Optional: for hotfixes, create a PR into main from the hotfix branch to see the CI checks pass
- [ ] On the appropriate branch/commit, create a calver tag for the release candidate, format example: `24.4.0-RC1`
- [ ] git tag 24.4.0-RC1
- [ ] git push upstream 24.4.0-RC1
- [ ] `git tag 24.4.0-RC1`
- [ ] `git push upstream 24.4.0-RC1`
- [ ] Sign-off with team; announce the tag in #besu-release in Discord
- [ ] Targeting this tag for the burn-in: https://github.com/hyperledger/besu/releases/tag/24.4.0-RC1
- [ ] Consensys staff start burn-in using this tag
- [ ] Seek sign off for burn-in
- [ ] Pass? Go ahead and complete the release process
- [ ] Fail? Put a message in #besu-release in Discord indicating the release will be aborted because it failed burn-in
- [ ] Optional: Perform a dry run with https://github.com/consensys/protocols-release-sandbox to test the workflows
- [ ] Sync fork
- [ ] git checkout <sha of 24.4.0-RC1>
- [ ] git tag 24.4.0
- [ ] git push origin 24.4.0
- [ ] Sync fork in github
- [ ] `git checkout <sha of 24.4.0-RC1>`
- [ ] `git tag 24.4.0`
- [ ] `git push <your remote name> 24.4.0`
- [ ] Manually run https://github.com/Consensys/protocols-release-sandbox/actions/workflows/draft-release.yml using `main` branch and `24.4.0` tag
- [ ] Back on besu, using the same git sha as 24.4.0-RC1, create a calver tag for the FULL RELEASE, example format `24.4.0`
- [ ] git checkout 24.4.0-RC1
- [ ] git tag 24.4.0
- [ ] git push upstream 24.4.0
- [ ] `git checkout 24.4.0-RC1`
- [ ] `git tag 24.4.0`
- [ ] `git push upstream 24.4.0`
- [ ] Manually run https://github.com/hyperledger/besu/actions/workflows/draft-release.yml using `main` branch` and the FULL RELEASE tag name, i.e. `24.4.0`. Note, this workflow should always be run from `main` branch (hotfix tags will still be released even if they were created based on another branch)
- publishes artefacts and version-specific docker tags but does not fully publish the GitHub release so subscribers are not yet notified
- [ ] Check all draft-release workflow jobs went green
- [ ] Check binary SHAs are correct on the release page
- [ ] Check artifacts exist in https://hyperledger.jfrog.io/ui/repos/tree/General/besu-maven
- [ ] Update release notes in the GitHub draft release, save draft and sign-off with team
- [ ] Publish draft release ensuring it is marked as latest release (if appropriate)
- this is now public and notifies subscribed users
- makes the release "latest" in github
- publishes the docker `latest` tag variants
- [ ] Create homebrew release using [update-version workflow](https://github.com/hyperledger/homebrew-besu/actions/workflows/update-version.yml)
- [ ] Create homebrew release PR using [update-version workflow](https://github.com/hyperledger/homebrew-besu/actions/workflows/update-version.yml)
- If the PR has not been automatically created, create the PR manually using the created branch `update-<version>`
- Run commands `brew tap hyperledger/besu && brew install besu` on MacOSX and verify latest version has been installed
- [ ] Verify homebrew release once the PR has merged using `brew tap hyperledger/besu && brew install besu` on MacOSX to verify latest version has been installed
- [ ] Delete the burn-in nodes (unless required for further analysis eg performance)
- [ ] Social announcements
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import java.io.IOException;

import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

public class CliqueProposeRpcAcceptanceTest extends AcceptanceTestBase {
Expand Down Expand Up @@ -59,6 +60,7 @@ public void shouldRemoveValidators() throws IOException {
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2));
}

@Disabled
@Test
public void shouldNotAddValidatorWhenInsufficientVotes() throws IOException {
final String[] initialValidators = {"miner1", "miner2"};
Expand Down Expand Up @@ -90,6 +92,7 @@ public void shouldNotRemoveValidatorWhenInsufficientVotes() throws IOException {
cluster.verify(clique.validatorsEqual(minerNode1, minerNode2, minerNode3));
}

@Disabled
@Test
public void shouldIncludeVoteInBlockHeader() throws IOException {
final String[] initialValidators = {"miner1", "miner2"};
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ subprojects {
password = artifactoryKey
}
defaults {
publications('mavenJava')
publications('mavenJava', 'mavenJavaPlatform')
publishArtifacts = true
publishPom = true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public Optional<Map<String, String>> getStateDiff() {
}

/** Builder class for Account overrides */
@JsonIgnoreProperties(ignoreUnknown = true)
public static class Builder {
private Optional<Wei> balance = Optional.empty();
private Optional<Long> nonce = Optional.empty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import static org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.engine.WithdrawalsValidatorProvider.getWithdrawalsValidator;

import org.hyperledger.besu.consensus.merge.blockcreation.MergeMiningCoordinator;
import org.hyperledger.besu.datatypes.Address;
import org.hyperledger.besu.datatypes.BlobGas;
import org.hyperledger.besu.datatypes.Hash;
import org.hyperledger.besu.datatypes.RequestType;
Expand Down Expand Up @@ -222,20 +221,8 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext)
blockParam.getTransactions().stream()
.map(Bytes::fromHexString)
.map(in -> TransactionDecoder.decodeOpaqueBytes(in, EncodingContext.BLOCK_BODY))
.collect(Collectors.toList());
transactions.forEach(
transaction ->
mergeCoordinator
.getEthScheduler()
.scheduleTxWorkerTask(
() -> {
Address sender = transaction.getSender();
LOG.atTrace()
.setMessage("The sender for transaction {} is calculated : {}")
.addArgument(transaction::getHash)
.addArgument(sender)
.log();
}));
.toList();
precomputeSenders(transactions);
} catch (final RLPException | IllegalArgumentException e) {
return respondWithInvalid(
reqId,
Expand Down Expand Up @@ -392,6 +379,47 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext)
}
}

private void precomputeSenders(final List<Transaction> transactions) {
transactions.forEach(
transaction -> {
mergeCoordinator
.getEthScheduler()
.scheduleTxWorkerTask(
() -> {
final var sender = transaction.getSender();
LOG.atTrace()
.setMessage("The sender for transaction {} is calculated : {}")
.addArgument(transaction::getHash)
.addArgument(sender)
.log();
});
if (transaction.getType().supportsDelegateCode()) {
precomputeAuthorities(transaction);
}
});
}

private void precomputeAuthorities(final Transaction transaction) {
final var codeDelegations = transaction.getCodeDelegationList().get();
int index = 0;
for (final var codeDelegation : codeDelegations) {
final var constIndex = index++;
mergeCoordinator
.getEthScheduler()
.scheduleTxWorkerTask(
() -> {
final var authority = codeDelegation.authorizer();
LOG.atTrace()
.setMessage(
"The code delegation authority at index {} for transaction {} is calculated : {}")
.addArgument(constIndex)
.addArgument(transaction::getHash)
.addArgument(authority)
.log();
});
}
}

JsonRpcResponse respondWith(
final Object requestId,
final EnginePayloadParameter param,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"request": {
"id": 3,
"jsonrpc": "2.0",
"method": "eth_call",
"params": [
{
"to": "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f",
"from": "a94f5374fce5edbc8e2a8697c15331677e6ebf0b",
"data": "0x12a7b914"
},
"latest",
{
"a94f5374fce5edbc8e2a8697c15331677e6ebf0b": {
"balance": "0xde0b6b3a7640000",
"nonce": 88
},
"0xb9741079a300Cb3B8f324CdDB847c0d1d273a05E": {
"stateDiff": {
"0x1cf7945003fc5b59d2f6736f0704557aa805c4f2844084ccd1173b8d56946962": "0x000000000000000000000000000000000000000000000000000000110ed03bf7"
},
"movePrecompileToAddress":null
}
}
]
},
"response": {
"jsonrpc": "2.0",
"id": 3,
"result": "0x0000000000000000000000000000000000000000000000000000000000000001"
},
"statusCode": 200
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ public class CodeDelegation implements org.hyperledger.besu.datatypes.CodeDelega
private final Address address;
private final long nonce;
private final SECPSignature signature;
private Optional<Address> authorizer = Optional.empty();
private boolean isAuthorityComputed = false;
private final Supplier<Optional<Address>> authorizerSupplier =
Suppliers.memoize(this::computeAuthority);

/**
* An access list entry as defined in EIP-7702
Expand Down Expand Up @@ -107,12 +107,7 @@ public SECPSignature signature() {

@Override
public Optional<Address> authorizer() {
if (!isAuthorityComputed) {
authorizer = computeAuthority();
isAuthorityComputed = true;
}

return authorizer;
return authorizerSupplier.get();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/
package org.hyperledger.besu.ethereum.transaction;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.hyperledger.besu.ethereum.mainnet.feemarket.ExcessBlobGasCalculator.calculateExcessBlobGasForParent;

import org.hyperledger.besu.crypto.SECPSignature;
Expand Down Expand Up @@ -176,7 +177,7 @@ public Optional<TransactionSimulatorResult> processOnPending(
}

public ProcessableBlockHeader simulatePendingBlockHeader() {
final long timestamp = System.currentTimeMillis();
final long timestamp = MILLISECONDS.toSeconds(System.currentTimeMillis());
final var chainHeadHeader = blockchain.getChainHeadHeader();
final ProtocolSpec protocolSpec =
protocolSchedule.getForNextBlockHeader(chainHeadHeader, timestamp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public interface MemorySize {
int ACCESS_LIST_ENTRY_SHALLOW_SIZE = 248;
int OPTIONAL_ACCESS_LIST_SHALLOW_SIZE = 40;
int OPTIONAL_CODE_DELEGATION_LIST_SHALLOW_SIZE = 40;
int CODE_DELEGATION_ENTRY_SIZE = 432;
int CODE_DELEGATION_ENTRY_SIZE = 472;
int VERSIONED_HASH_SIZE = 96;
int LIST_SHALLOW_SIZE = 48;
int OPTIONAL_SHALLOW_SIZE = 16;
Expand Down
1 change: 0 additions & 1 deletion evm/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ dependencies {
implementation 'io.tmio:tuweni-bytes'
implementation 'io.tmio:tuweni-units'
implementation 'org.hyperledger.besu:arithmetic'
implementation 'org.hyperledger.besu:bls12-381'
implementation'org.hyperledger.besu:gnark'
implementation 'tech.pegasys:jc-kzg-4844'

Expand Down
68 changes: 30 additions & 38 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5160,12 +5160,12 @@
<sha256 value="34b596f4f3d2ff52b504123db26faad19a61175a6c0b1012d75a7ff29567e727" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="arithmetic" version="0.9.7">
<artifact name="arithmetic-0.9.7.jar">
<sha256 value="54b1f4edbbc06bd974c5b3aad5acc21c85213997c8b91b051fe240f90d674f93" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="arithmetic" version="1.0.0">
<artifact name="arithmetic-1.0.0.jar">
<sha256 value="345a84dfea8ae10ede68f398536f044969a1e892889df7db1da1e7adcdbdf568" origin="Generated by Gradle"/>
</artifact>
<artifact name="arithmetic-0.9.7.module">
<sha256 value="96d8a26b967d7baa88d1f0916485471e94bd0938e5aafd8f7948dd48b308d48c" origin="Generated by Gradle"/>
<artifact name="arithmetic-1.0.0.module">
<sha256 value="8578576320696f0deb90640a615beb26c412f8f2af177a4cc09d909b19478235" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="besu-errorprone-checks" version="1.0.0">
Expand All @@ -5176,52 +5176,44 @@
<sha256 value="c273525c9f23a0bd5b9cf6830b4bebd9d81e355b7f2ed3a22f23f76c2a2313d5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="blake2bf" version="0.9.7">
<artifact name="blake2bf-0.9.7.jar">
<sha256 value="855acac6367e185ffbc88c816888e123ef582c12e80a2bb01b920e0db2542890" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="blake2bf" version="1.0.0">
<artifact name="blake2bf-1.0.0.jar">
<sha256 value="653d536118203bf38c053ab55cf34d12cbf4a8abbbf84b9f612628db4118f991" origin="Generated by Gradle"/>
</artifact>
<artifact name="blake2bf-0.9.7.module">
<sha256 value="70b962c1f1c16b7bd54c5d5bcabbf5258fef3ba72973d73d1abc8fb5e11ddc25" origin="Generated by Gradle"/>
<artifact name="blake2bf-1.0.0.module">
<sha256 value="f1a0926c2a76a62631f567a8cf688bcc072d0c9abeae7129e800e677e26e0e4d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="bls12-381" version="0.9.7">
<artifact name="bls12-381-0.9.7.jar">
<sha256 value="74ccf0160698c539f084057e3eee6f1a42ccadf570667ed06c8770b164bc972b" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="gnark" version="1.0.0">
<artifact name="gnark-1.0.0.jar">
<sha256 value="c4cba4b2c7726aa612a4c4bdc0c935dc602b5bacad95209e5c6aa4245b69d46b" origin="Generated by Gradle"/>
</artifact>
<artifact name="bls12-381-0.9.7.module">
<sha256 value="e2ba91e9de0f9699e8469372bf5fdc3faef5e373e705f977a94b5c3a90b92a7e" origin="Generated by Gradle"/>
<artifact name="gnark-1.0.0.module">
<sha256 value="26406323965edf79d4100e41eabc5f16ee836f74501759093765c51774995c17" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="gnark" version="0.9.7">
<artifact name="gnark-0.9.7.jar">
<sha256 value="fd3b4d5acd31d193b00329d935a9752f95484da8824a3f86cf5709fa9d2da846" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="ipa-multipoint" version="1.0.0">
<artifact name="ipa-multipoint-1.0.0.jar">
<sha256 value="d41c202a515864b9afe34e995ff23d376d34cec43a7cb407d8f679275d48991b" origin="Generated by Gradle"/>
</artifact>
<artifact name="gnark-0.9.7.module">
<sha256 value="485c0d98325aedc4c66d59e52735953e66caed3937490712dd28954fabd5ef1d" origin="Generated by Gradle"/>
<artifact name="ipa-multipoint-1.0.0.module">
<sha256 value="6fbcb5ddce96d01f613bed394c286eb96cfc4688ce52c29209013dd7525ca80c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="ipa-multipoint" version="0.9.7">
<artifact name="ipa-multipoint-0.9.7.jar">
<sha256 value="426783770512da361b1cdbcc3c7c70b6f69fbf7b79588d39a3a1de4bcb14fc34" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="secp256k1" version="1.0.0">
<artifact name="secp256k1-1.0.0.jar">
<sha256 value="8efcd8be80b116845fa39e068d44a21ed640b466229a97a09c09d6b5d81534d5" origin="Generated by Gradle"/>
</artifact>
<artifact name="ipa-multipoint-0.9.7.module">
<sha256 value="b7bd007ba40242c09e932dadee8271402a3cd44756cbbcec8b1cf993d3d5803a" origin="Generated by Gradle"/>
<artifact name="secp256k1-1.0.0.module">
<sha256 value="1d0316a2acaa26460b7370a4554f11e2be40201a2342339057b40ac626cec29c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="secp256k1" version="0.9.7">
<artifact name="secp256k1-0.9.7.jar">
<sha256 value="e3953351c5bceed7fe4ded784f69485b32ee689e27011738d0543e98af49186f" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="secp256r1" version="1.0.0">
<artifact name="secp256r1-1.0.0.jar">
<sha256 value="3b61854dac6fa25523dbe764d5a0705019a90e4ff245452189a2a7dfe07deeda" origin="Generated by Gradle"/>
</artifact>
<artifact name="secp256k1-0.9.7.module">
<sha256 value="84a037db020fe83b02d176bd7588759ca700d52959393c6d24eb99696db0ed79" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="secp256r1" version="0.9.7">
<artifact name="secp256r1-0.9.7.jar">
<sha256 value="36e805e65cb8d2eece17dcdf5c785f7e1b43d5778427deb80a3c0fac04f4eb08" origin="Generated by Gradle"/>
</artifact>
<artifact name="secp256r1-0.9.7.module">
<sha256 value="7ffa9739208ede60d20703ee78342be760ccc4ca766724dabdc3410fe02b3051" origin="Generated by Gradle"/>
<artifact name="secp256r1-1.0.0.module">
<sha256 value="bad0027a7a7c67db7f348d08304da9cb1e9bdd4f41465a99cee17c8352e41a85" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.immutables" name="bom" version="2.10.1">
Expand Down
15 changes: 7 additions & 8 deletions platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,12 @@ dependencies {

api 'org.hibernate.validator:hibernate-validator:8.0.1.Final'

api 'org.hyperledger.besu:arithmetic:0.9.7'
api 'org.hyperledger.besu:blake2bf:0.9.7'
api 'org.hyperledger.besu:bls12-381:0.9.7'
api 'org.hyperledger.besu:gnark:0.9.7'
api 'org.hyperledger.besu:ipa-multipoint:0.9.7'
api 'org.hyperledger.besu:secp256k1:0.9.7'
api 'org.hyperledger.besu:secp256r1:0.9.7'
api 'org.hyperledger.besu:arithmetic:1.0.0'
api 'org.hyperledger.besu:blake2bf:1.0.0'
api 'org.hyperledger.besu:gnark:1.0.0'
api 'org.hyperledger.besu:ipa-multipoint:1.0.0'
api 'org.hyperledger.besu:secp256k1:1.0.0'
api 'org.hyperledger.besu:secp256r1:1.0.0'

api 'org.hyperledger.besu:besu-errorprone-checks:1.0.0'

Expand Down Expand Up @@ -195,7 +194,7 @@ spotless {

publishing {
publications {
mavenPlatform(MavenPublication) {
mavenJavaPlatform(MavenPublication) {
from components.javaPlatform
groupId "org.hyperledger.besu"
artifactId 'bom'
Expand Down

0 comments on commit 931e12c

Please sign in to comment.