Skip to content

Commit

Permalink
Merge branch 'main' into replace-waitforpeertask-with-ethpeers-method
Browse files Browse the repository at this point in the history
  • Loading branch information
Matilda-Clerke authored Dec 17, 2024
2 parents 4cdf752 + 49ed3ce commit 65a1b56
Show file tree
Hide file tree
Showing 7 changed files with 82 additions and 39 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
21 changes: 18 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Unreleased

### Breaking Changes
- `--host-whitelist` has been deprecated since 2020 and its related option will be removed in a future release.
- `--host-whitelist` has been deprecated since 2020 and this option is removed. Use the equivalent `--host-allowlist` instead.

### Upcoming Breaking Changes
- Plugin API will be deprecating the BesuContext interface to be replaced with the ServiceManager interface.
Expand All @@ -16,12 +16,27 @@
- Proof of Work consensus
- Fast Sync



### Additions and Improvements
- Retrieve all transaction receipts for a block in one request [#6646](https://github.com/hyperledger/besu/pull/6646)

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

## 24.12.2 Hotfix

This is an optional hotfix to address serialization of state overrides parameter when `movePrecompileToAddress` is present.

There is no need to upgrade from 24.12.0 (or 24.12.1) to this release if you are not yet using this functionality.

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

## 24.12.1 Hotfix

This is a hotfix to address publishing besu maven artifacts. There are no issues with 24.12.0 other than incomplete artifact publishing, and there is no functional difference between 24.12.0 and 24.12.1 release binaries.

### Bug fixes
- Fix BOM pom publication to Artifactory [#8201](https://github.com/hyperledger/besu/pull/8021)

## 24.12.0

Expand Down
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
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
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

0 comments on commit 65a1b56

Please sign in to comment.