Merge branch 'main' of github.com:hyperledger/besu into mega-eof

mega-eof
Danno Ferrin 6 months ago
commit af8a6291fb
  1. 1
      CHANGELOG.md
  2. 9
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AdminNodeInfo.java
  3. 9
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/AdminJsonRpcMethods.java
  4. 3
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/JsonRpcMethodsFactory.java
  5. 18
      ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/AdminNodeInfoTest.java
  6. 62
      gradle/verification-metadata.xml
  7. 2
      gradle/versions.gradle

@ -6,6 +6,7 @@
### Additions and Improvements
- Add two counters to DefaultBlockchain in order to be able to calculate TPS and Mgas/s [#7105](https://github.com/hyperledger/besu/pull/7105)
- `admin_nodeInfo` JSON/RPC call returns the currently active EVM version [#7127](https://github.com/hyperledger/besu/pull/7127)
### Bug fixes
- Make `eth_gasPrice` aware of the base fee market [#7102](https://github.com/hyperledger/besu/pull/7102)

@ -23,6 +23,7 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.JsonRpcSucces
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.response.RpcErrorType;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.chain.ChainHead;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule;
import org.hyperledger.besu.ethereum.p2p.network.P2PNetwork;
import org.hyperledger.besu.nat.NatService;
import org.hyperledger.besu.nat.core.domain.NatPortMapping;
@ -47,6 +48,7 @@ public class AdminNodeInfo implements JsonRpcMethod {
private final P2PNetwork peerNetwork;
private final BlockchainQueries blockchainQueries;
private final NatService natService;
private final ProtocolSchedule protocolSchedule;
public AdminNodeInfo(
final String clientVersion,
@ -54,13 +56,15 @@ public class AdminNodeInfo implements JsonRpcMethod {
final GenesisConfigOptions genesisConfigOptions,
final P2PNetwork peerNetwork,
final BlockchainQueries blockchainQueries,
final NatService natService) {
final NatService natService,
final ProtocolSchedule protocolSchedule) {
this.peerNetwork = peerNetwork;
this.clientVersion = clientVersion;
this.genesisConfigOptions = genesisConfigOptions;
this.blockchainQueries = blockchainQueries;
this.networkId = networkId;
this.natService = natService;
this.protocolSchedule = protocolSchedule;
}
@Override
@ -126,6 +130,9 @@ public class AdminNodeInfo implements JsonRpcMethod {
"network",
networkId)));
response.put(
"activeFork", protocolSchedule.getByBlockHeader(chainHead.getBlockHeader()).getName());
return new JsonRpcSuccessResponse(requestContext.getRequest().getId(), response);
}

@ -28,6 +28,7 @@ import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.JsonRpcMethod;
import org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods.PluginsReloadConfiguration;
import org.hyperledger.besu.ethereum.api.query.BlockchainQueries;
import org.hyperledger.besu.ethereum.eth.manager.EthPeers;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule;
import org.hyperledger.besu.ethereum.p2p.network.P2PNetwork;
import org.hyperledger.besu.ethereum.p2p.peers.EnodeDnsConfiguration;
import org.hyperledger.besu.nat.NatService;
@ -48,6 +49,7 @@ public class AdminJsonRpcMethods extends ApiGroupJsonRpcMethods {
private final Map<String, BesuPlugin> namedPlugins;
private final EthPeers ethPeers;
private final Optional<EnodeDnsConfiguration> enodeDnsConfiguration;
private final ProtocolSchedule protocolSchedule;
public AdminJsonRpcMethods(
final String clientVersion,
@ -58,7 +60,8 @@ public class AdminJsonRpcMethods extends ApiGroupJsonRpcMethods {
final Map<String, BesuPlugin> namedPlugins,
final NatService natService,
final EthPeers ethPeers,
final Optional<EnodeDnsConfiguration> enodeDnsConfiguration) {
final Optional<EnodeDnsConfiguration> enodeDnsConfiguration,
final ProtocolSchedule protocolSchedule) {
this.clientVersion = clientVersion;
this.networkId = networkId;
this.genesisConfigOptions = genesisConfigOptions;
@ -68,6 +71,7 @@ public class AdminJsonRpcMethods extends ApiGroupJsonRpcMethods {
this.natService = natService;
this.ethPeers = ethPeers;
this.enodeDnsConfiguration = enodeDnsConfiguration;
this.protocolSchedule = protocolSchedule;
}
@Override
@ -86,7 +90,8 @@ public class AdminJsonRpcMethods extends ApiGroupJsonRpcMethods {
genesisConfigOptions,
p2pNetwork,
blockchainQueries,
natService),
natService,
protocolSchedule),
new AdminPeers(ethPeers),
new AdminChangeLogLevel(),
new AdminGenerateLogBloomCache(blockchainQueries),

@ -97,7 +97,8 @@ public class JsonRpcMethodsFactory {
namedPlugins,
natService,
ethPeers,
enodeDnsConfiguration),
enodeDnsConfiguration,
protocolSchedule),
new DebugJsonRpcMethods(
blockchainQueries,
protocolContext,

@ -15,6 +15,7 @@
package org.hyperledger.besu.ethereum.api.jsonrpc.internal.methods;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.when;
@ -33,6 +34,8 @@ import org.hyperledger.besu.ethereum.chain.Blockchain;
import org.hyperledger.besu.ethereum.chain.ChainHead;
import org.hyperledger.besu.ethereum.core.BlockHeader;
import org.hyperledger.besu.ethereum.core.Difficulty;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSchedule;
import org.hyperledger.besu.ethereum.mainnet.ProtocolSpec;
import org.hyperledger.besu.ethereum.p2p.network.P2PNetwork;
import org.hyperledger.besu.ethereum.p2p.peers.DefaultPeer;
import org.hyperledger.besu.ethereum.p2p.peers.EnodeURLImpl;
@ -67,6 +70,8 @@ public class AdminNodeInfoTest {
@Mock private BlockchainQueries blockchainQueries;
@Mock private NatService natService;
@Mock private BlockHeader blockHeader;
@Mock private ProtocolSchedule protocolSchedule;
@Mock private ProtocolSpec protocolSpec;
private AdminNodeInfo method;
@ -93,6 +98,8 @@ public class AdminNodeInfoTest {
when(blockchainQueries.getBlockHashByNumber(anyLong())).thenReturn(Optional.of(Hash.EMPTY));
when(blockchain.getChainHead()).thenReturn(testChainHead);
when(natService.queryExternalIPAddress(anyString())).thenReturn("1.2.3.4");
when(protocolSpec.getName()).thenReturn("London");
when(protocolSchedule.getByBlockHeader(any())).thenReturn(protocolSpec);
method =
new AdminNodeInfo(
"testnet/1.0/this/that",
@ -100,7 +107,8 @@ public class AdminNodeInfoTest {
genesisConfigOptions,
p2pNetwork,
blockchainQueries,
natService);
natService,
protocolSchedule);
}
@Test
@ -110,6 +118,7 @@ public class AdminNodeInfoTest {
final JsonRpcRequestContext request = adminNodeInfo();
final Map<String, Object> expected = new HashMap<>();
expected.put("activeFork", "London");
expected.put(
"enode",
"enode://0f1b319e32017c3fcb221841f0f978701b4e9513fe6a567a2db43d43381a9c7e3dfe7cae13cbc2f56943400bacaf9082576ab087cd51983b17d729ae796f6807@1.2.3.4:30303?discport=7890");
@ -161,6 +170,7 @@ public class AdminNodeInfoTest {
final JsonRpcRequestContext request = adminNodeInfo();
final Map<String, Object> expected = new HashMap<>();
expected.put("activeFork", "London");
expected.put(
"enode",
"enode://0f1b319e32017c3fcb221841f0f978701b4e9513fe6a567a2db43d43381a9c7e3dfe7cae13cbc2f56943400bacaf9082576ab087cd51983b17d729ae796f6807@3.4.5.6:8081?discport=8080");
@ -207,6 +217,7 @@ public class AdminNodeInfoTest {
final JsonRpcRequestContext request = adminNodeInfo();
final Map<String, Object> expected = new HashMap<>();
expected.put("activeFork", "London");
expected.put(
"enode",
"enode://0f1b319e32017c3fcb221841f0f978701b4e9513fe6a567a2db43d43381a9c7e3dfe7cae13cbc2f56943400bacaf9082576ab087cd51983b17d729ae796f6807@1.2.3.4:0");
@ -253,6 +264,7 @@ public class AdminNodeInfoTest {
final JsonRpcRequestContext request = adminNodeInfo();
final Map<String, Object> expected = new HashMap<>();
expected.put("activeFork", "London");
expected.put(
"enode",
"enode://0f1b319e32017c3fcb221841f0f978701b4e9513fe6a567a2db43d43381a9c7e3dfe7cae13cbc2f56943400bacaf9082576ab087cd51983b17d729ae796f6807@1.2.3.4:0?discport=7890");
@ -299,6 +311,7 @@ public class AdminNodeInfoTest {
final JsonRpcRequestContext request = adminNodeInfo();
final Map<String, Object> expected = new HashMap<>();
expected.put("activeFork", "London");
expected.put(
"enode",
"enode://0f1b319e32017c3fcb221841f0f978701b4e9513fe6a567a2db43d43381a9c7e3dfe7cae13cbc2f56943400bacaf9082576ab087cd51983b17d729ae796f6807@1.2.3.4:7890?discport=0");
@ -387,7 +400,8 @@ public class AdminNodeInfoTest {
genesisClassicConfigOptions,
p2pNetwork,
blockchainQueries,
natService);
natService,
protocolSchedule);
final JsonRpcRequestContext request = adminNodeInfo();

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.2.xsd">
<verification-metadata xmlns="https://schema.gradle.org/dependency-verification" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://schema.gradle.org/dependency-verification https://schema.gradle.org/dependency-verification/dependency-verification-1.3.xsd">
<configuration>
<verify-metadata>true</verify-metadata>
<verify-signatures>false</verify-signatures>
@ -4659,12 +4659,12 @@
<sha256 value="6d535f94efb663bdb682c9f27a50335394688009642ba7a9677504bc1be4129b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="arithmetic" version="0.8.4">
<artifact name="arithmetic-0.8.4.jar">
<sha256 value="c0b50e68afea3114b04a7443d3d718b9fdedf207dbc7b09702bccb536d6e2956" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="arithmetic" version="0.8.5">
<artifact name="arithmetic-0.8.5.jar">
<sha256 value="e9a63212bd30535dfd67366b768bb307c3b8f58ac29e5b322be3048bbfec9ea2" origin="Generated by Gradle"/>
</artifact>
<artifact name="arithmetic-0.8.4.module">
<sha256 value="dc5d3e8f211aab8170babfe9a00824f6463d7a56c3d2f0fa0dd237431204375d" origin="Generated by Gradle"/>
<artifact name="arithmetic-0.8.5.module">
<sha256 value="813ba38216ddd5e00e29cc3dc9b6a56dc47d936837fe67ee0233729cc2f415a1" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="besu-errorprone-checks" version="1.0.0">
@ -4675,44 +4675,44 @@
<sha256 value="c273525c9f23a0bd5b9cf6830b4bebd9d81e355b7f2ed3a22f23f76c2a2313d5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="blake2bf" version="0.8.4">
<artifact name="blake2bf-0.8.4.jar">
<sha256 value="7b22ca7c3e86ae77f6f2daec211a0186fd615a46dd602ee4cd28c50f9b62beab" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="blake2bf" version="0.8.5">
<artifact name="blake2bf-0.8.5.jar">
<sha256 value="c755f71c2176870ec0014fcd253fc22f62475409f9cae8ed512511fe687783b4" origin="Generated by Gradle"/>
</artifact>
<artifact name="blake2bf-0.8.4.module">
<sha256 value="2c797fcc4c0cb7898598822a01fbfcb7c7b9159aaf12d6fd4e6f7c93a30d6f5b" origin="Generated by Gradle"/>
<artifact name="blake2bf-0.8.5.module">
<sha256 value="81c14a13dbcdb1773f144adb6b568b6939c157d1697a100ba972810e90f26c6c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="bls12-381" version="0.8.4">
<artifact name="bls12-381-0.8.4.jar">
<sha256 value="1fe6790671b73918caf31b529e5bafb998125df08cd157a986366a2d6e53f5fe" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="bls12-381" version="0.8.5">
<artifact name="bls12-381-0.8.5.jar">
<sha256 value="1de31f7287207ab9f289b99c4297c2b63611147aff7e3f743474dc045079407a" origin="Generated by Gradle"/>
</artifact>
<artifact name="bls12-381-0.8.4.module">
<sha256 value="dbf1e7184a30d4adc4578ee5df95502e9f6fef6f78c4f561eb5e71d644b6e23e" origin="Generated by Gradle"/>
<artifact name="bls12-381-0.8.5.module">
<sha256 value="8cc12637b2d12930c1ac1bb9c65c4353c3f25262f581c0fa6045e0731a2c7028" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="ipa-multipoint" version="0.8.4">
<artifact name="ipa-multipoint-0.8.4.jar">
<sha256 value="c5e44a5f1eed6852a8dd6db1457c935309657c9d425489ae9e20e23e45fbabfc" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="ipa-multipoint" version="0.8.5">
<artifact name="ipa-multipoint-0.8.5.jar">
<sha256 value="454d75e6da12107c77c6540bef21a38d9a6ca8b657befc27f3080259bb0a69f1" origin="Generated by Gradle"/>
</artifact>
<artifact name="ipa-multipoint-0.8.4.module">
<sha256 value="24e5ee51a0d4f71261cfb2f7b1229c1a6a730be5e01dda4de1fcd6dccf38dbb9" origin="Generated by Gradle"/>
<artifact name="ipa-multipoint-0.8.5.module">
<sha256 value="40898ca1a81b1f5ef2574012e5b444c104f230788623e7fcbf531d8d133ef93a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="secp256k1" version="0.8.4">
<artifact name="secp256k1-0.8.4.jar">
<sha256 value="e594f8f88758832eeea1cb82fc6b671a680f65b9271640791adcec5a31043585" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="secp256k1" version="0.8.5">
<artifact name="secp256k1-0.8.5.jar">
<sha256 value="8f6e1143751937f0f3d172bf88ea7325462aa0ac2038a300702e0e937fab326c" origin="Generated by Gradle"/>
</artifact>
<artifact name="secp256k1-0.8.4.module">
<sha256 value="0bd1a3fe6b629656591e7ca855a41f206cbf765b5a27e91698dcaf7c85635f68" origin="Generated by Gradle"/>
<artifact name="secp256k1-0.8.5.module">
<sha256 value="68646f0d4f6a128d603d071141d08cf8adcfbe48ba8938ba201dd29f790738b3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.hyperledger.besu" name="secp256r1" version="0.8.4">
<artifact name="secp256r1-0.8.4.jar">
<sha256 value="2219ed32cb64c0f745ae280db024c5c009401c5f1bab730c18c843fecd989e26" origin="Generated by Gradle"/>
<component group="org.hyperledger.besu" name="secp256r1" version="0.8.5">
<artifact name="secp256r1-0.8.5.jar">
<sha256 value="74abcbb422cf6b9fcfc3cd57b642ae816c9670500e8dfcfd91eabdb14500f2c2" origin="Generated by Gradle"/>
</artifact>
<artifact name="secp256r1-0.8.4.module">
<sha256 value="99ff15249a3a360176b99ece8aba58202573f67416398ab07873844291080135" origin="Generated by Gradle"/>
<artifact name="secp256r1-0.8.5.module">
<sha256 value="f98894d37c03f40ce20b74c6ca6b9b2cba4782063ac8428b7bd379f9de73672a" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.immutables" name="immutables" version="2.10.0">

@ -156,7 +156,7 @@ dependencyManagement {
dependency 'org.openjdk.jol:jol-core:0.17'
dependency 'tech.pegasys:jc-kzg-4844:1.0.0'
dependencySet(group: 'org.hyperledger.besu', version: '0.8.4') {
dependencySet(group: 'org.hyperledger.besu', version: '0.8.5') {
entry 'arithmetic'
entry 'ipa-multipoint'
entry 'bls12-381'

Loading…
Cancel
Save