diff --git a/hedera-dependency-versions/build.gradle.kts b/hedera-dependency-versions/build.gradle.kts index c0b0b81b7e87..87e02704280f 100644 --- a/hedera-dependency-versions/build.gradle.kts +++ b/hedera-dependency-versions/build.gradle.kts @@ -173,10 +173,10 @@ dependencies.constraints { api("org.hamcrest:hamcrest:2.2") { because("org.hamcrest") } - api("org.hyperledger.besu:besu-datatypes:23.10.0") { + api("org.hyperledger.besu:besu-datatypes:24.3.3") { because("org.hyperledger.besu.datatypes") } - api("org.hyperledger.besu:evm:23.10.0") { + api("org.hyperledger.besu:evm:24.3.3") { because("org.hyperledger.besu.evm") } api("org.hyperledger.besu:secp256k1:0.8.2") { diff --git a/hedera-node/configuration/compose/bootstrap.properties b/hedera-node/configuration/compose/bootstrap.properties index 65699edba791..f46de3d2dac2 100644 --- a/hedera-node/configuration/compose/bootstrap.properties +++ b/hedera-node/configuration/compose/bootstrap.properties @@ -3,4 +3,3 @@ accounts.blocklist.enabled=false accounts.blocklist.path= contracts.knownBlockHash= -contracts.evm.version=v0.30 \ No newline at end of file diff --git a/hedera-node/configuration/dev/bootstrap.properties b/hedera-node/configuration/dev/bootstrap.properties index aa1159b02393..391cc478a4ac 100644 --- a/hedera-node/configuration/dev/bootstrap.properties +++ b/hedera-node/configuration/dev/bootstrap.properties @@ -11,4 +11,3 @@ staking.fees.nodeRewardPercentage=10 staking.fees.stakingRewardPercentage=10 contracts.knownBlockHash= -contracts.evm.version=v0.30 \ No newline at end of file diff --git a/hedera-node/configuration/mainnet/bootstrap.properties b/hedera-node/configuration/mainnet/bootstrap.properties index 5fa2a8207f71..432b7ad28eab 100644 --- a/hedera-node/configuration/mainnet/bootstrap.properties +++ b/hedera-node/configuration/mainnet/bootstrap.properties @@ -4,4 +4,3 @@ # This file MUST match application.properties exactly as they are both a replica of file 121 on mainnet and # this file is utilized by the mono-service config for property overrides whereas application.properties is utilized as # an override by the hedera-config base config. -contracts.evm.version=v0.30 \ No newline at end of file diff --git a/hedera-node/configuration/preprod/bootstrap.properties b/hedera-node/configuration/preprod/bootstrap.properties index e6d7a76ea17f..9e986e1919b1 100644 --- a/hedera-node/configuration/preprod/bootstrap.properties +++ b/hedera-node/configuration/preprod/bootstrap.properties @@ -4,4 +4,3 @@ accounts.blocklist.enabled=false accounts.blocklist.path= contracts.knownBlockHash= -contracts.evm.version=v0.30 \ No newline at end of file diff --git a/hedera-node/configuration/previewnet/bootstrap.properties b/hedera-node/configuration/previewnet/bootstrap.properties index 111decce3920..13797d13fbf8 100644 --- a/hedera-node/configuration/previewnet/bootstrap.properties +++ b/hedera-node/configuration/previewnet/bootstrap.properties @@ -5,5 +5,5 @@ accounts.blocklist.enabled=false accounts.blocklist.path= contracts.evm.version.dynamic=true contracts.maxNumWithHapiSigsAccess=0 -contracts.evm.version=v0.30 + contracts.knownBlockHash= diff --git a/hedera-node/configuration/testnet/bootstrap.properties b/hedera-node/configuration/testnet/bootstrap.properties index aaa8090ef19e..017d695f584c 100644 --- a/hedera-node/configuration/testnet/bootstrap.properties +++ b/hedera-node/configuration/testnet/bootstrap.properties @@ -14,4 +14,3 @@ ledger.id=0x01 contracts.chainId=296 bootstrap.genesisPublicKey=e06b22e0966108fa5d63fc6ae53f9824319b891cd4d6050dbf2b242be7e13344 contracts.knownBlockHash= -contracts.evm.version=v0.30 diff --git a/hedera-node/hapi-utils/src/main/java/com/hedera/node/app/hapi/utils/ethereum/EthTxData.java b/hedera-node/hapi-utils/src/main/java/com/hedera/node/app/hapi/utils/ethereum/EthTxData.java index ee7f9f49392c..e655ef159256 100644 --- a/hedera-node/hapi-utils/src/main/java/com/hedera/node/app/hapi/utils/ethereum/EthTxData.java +++ b/hedera-node/hapi-utils/src/main/java/com/hedera/node/app/hapi/utils/ethereum/EthTxData.java @@ -31,7 +31,6 @@ import java.util.Objects; import org.apache.commons.codec.binary.Hex; import org.bouncycastle.jcajce.provider.digest.Keccak; -import org.bouncycastle.util.BigIntegers; public record EthTxData( byte[] rawTx, @@ -56,7 +55,7 @@ public record EthTxData( * transactions come in with transfer amounts in units of weibar. Elsewhere in Hedera we use * units of tinybar (10⁻⁸ of an hbar), and here is the conversion factor: */ - public static final BigInteger WEIBARS_IN_A_TINYBAR = BigInteger.valueOf(1L); + public static final BigInteger WEIBARS_IN_A_TINYBAR = BigInteger.valueOf(10_000_000_000L); // Copy of constants from besu-native, remove when next besu-native publishes static final int SECP256K1_FLAGS_TYPE_COMPRESSION = 1 << 1; @@ -386,7 +385,7 @@ private static EthTxData populateLegacyEthTxData(RLPItem rlpItem, byte[] rawTx) if (vBI.compareTo(BigInteger.valueOf(34)) > 0) { // after EIP155 the chain id is equal to // CHAIN_ID = (v - {0,1} - 35) / 2 - chainId = BigIntegers.asUnsignedByteArray(vBI.subtract(BigInteger.valueOf(35)).shiftRight(1)); + chainId = vBI.subtract(BigInteger.valueOf(35)).shiftRight(1).toByteArray(); } else if (isLegacyUnprotectedEtx(vBI)) { // before EIP155 the chain id is considered equal to 0 chainId = new byte[0]; diff --git a/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/EthTxDataTest.java b/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/EthTxDataTest.java index 746ce9399e04..3d87475d37fb 100644 --- a/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/EthTxDataTest.java +++ b/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/EthTxDataTest.java @@ -35,7 +35,6 @@ import java.math.BigInteger; import java.util.Arrays; import java.util.List; -import org.bouncycastle.util.BigIntegers; import org.bouncycastle.util.encoders.Hex; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; @@ -47,8 +46,6 @@ class EthTxDataTest { static final String SIGNATURE_PUBKEY = "033a514176466fa815ed481ffad09110a2d344f6c9b78c1d14afc351c3a51be33d"; static final String RAW_TX_TYPE_0 = "f864012f83018000947e3a9eaf9bcc39e2ffa38eb30bf7a93feacbc18180827653820277a0f9fbff985d374be4a55f296915002eec11ac96f1ce2df183adf992baa9390b2fa00c1e867cc960d9c74ec2e6a662b7908ec4c8cc9f3091e886bcefbeb2290fb792"; - static final String RAW_TX_TYPE_0_WITH_CHAIN_ID_11155111 = - "f86b048503ff9aca0782520f94e64fac7f3df5ab44333ad3d3eb3fb68be43f2e8c830fffff808401546d71a026cf0758fda122862a4de71a82a3210ef7c172ee13eae42997f5d32b747ec78ca03587c5c2eee373b1e45693544edcde8dde883d2be3e211b3f0f3c840d6389c8a"; static final String RAW_TX_TYPE_0_TRIMMED_LAST_BYTES = "f864012f83018000947e3a9eaf9bcc39e2ffa38eb30bf7a93feacbc18180827653820277a0f9fbff985d374be4a55f296915002eec11ac96f1ce2df183adf992baa9390b2fa00c1e867cc960d9c74ec2e6a662b7908ec4c8cc9f3091e886bcefbeb2290000"; // { @@ -604,18 +601,4 @@ void bigPositiveValueWithDifferentTypes(EthTransactionType type) { assertEquals(bigValue, populateEthTxData.value()); } - - @Test - void thatPassesOnBigIntegerByteArray() { - final var subject = EthTxData.populateEthTxData(Hex.decode(RAW_TX_TYPE_0_WITH_CHAIN_ID_11155111)); - byte[] passingChainId = BigIntegers.asUnsignedByteArray(BigInteger.valueOf(11155111L)); - assertEquals(Hex.toHexString(subject.chainId()), Hex.toHexString(passingChainId)); - } - - @Test - void thatFailsOnBigIntegerByteArray() { - final var subject = EthTxData.populateEthTxData(Hex.decode(RAW_TX_TYPE_0_WITH_CHAIN_ID_11155111)); - byte[] failingChainId = BigInteger.valueOf(11155111L).toByteArray(); - assertNotEquals(Hex.toHexString(subject.chainId()), Hex.toHexString(failingChainId)); - } } diff --git a/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/TestingConstants.java b/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/TestingConstants.java index 937e203d346a..20a44d5b186e 100644 --- a/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/TestingConstants.java +++ b/hedera-node/hapi-utils/src/test/java/com/hedera/node/app/hapi/utils/ethereum/TestingConstants.java @@ -35,7 +35,7 @@ public class TestingConstants { static final byte[] CHAINID_TESTNET = unhex("0128"); - static final BigInteger WEIBARS_IN_TINYBAR = BigInteger.valueOf(1L); + static final BigInteger WEIBARS_IN_TINYBAR = BigInteger.valueOf(10_000_000_000L); static final byte[] TINYBARS_57_IN_WEIBARS = BigInteger.valueOf(57).multiply(WEIBARS_IN_TINYBAR).toByteArray(); diff --git a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/ingest/IngestChecker.java b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/ingest/IngestChecker.java index 4b34692d3b1b..b5ffdfd3f2eb 100644 --- a/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/ingest/IngestChecker.java +++ b/hedera-node/hedera-app/src/main/java/com/hedera/node/app/workflows/ingest/IngestChecker.java @@ -148,9 +148,6 @@ public IngestChecker( */ public void checkNodeState() throws PreCheckException { if (currentPlatformStatus.get() != ACTIVE) { - logger.info( - "CURRENT PLATFORM STATUS is {} just before PLATFORM_NOT_ACTIVE error \n\n", - currentPlatformStatus.get().toString()); throw new PreCheckException(PLATFORM_NOT_ACTIVE); } } diff --git a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/utils/FrameBuilder.java b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/utils/FrameBuilder.java index 005bb41f437e..111a1b220bf7 100644 --- a/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/utils/FrameBuilder.java +++ b/hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/utils/FrameBuilder.java @@ -102,8 +102,10 @@ public MessageFrame buildInitialFrameWith( .originator(from) .gasPrice(Wei.of(context.gasPrice())) .sender(from) - .value(value) - .apparentValue(value) + .value(Wei.of(1)) + .apparentValue(Wei.of(1)) + // .value(value) + // .apparentValue(value) .blockValues(context.blockValuesOf(transaction.gasLimit())) .completer(unused -> {}) .isStatic(context.staticCall()) diff --git a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/HapiSuite.java b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/HapiSuite.java index 022e6686ad13..f882089461fd 100644 --- a/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/HapiSuite.java +++ b/hedera-node/test-clients/src/main/java/com/hedera/services/bdd/suites/HapiSuite.java @@ -95,7 +95,7 @@ private static HapiSpec specFrom(@NonNull final DynamicTest test) { .build(); private static final int BYTES_PER_KB = 1024; public static final int MAX_CALL_DATA_SIZE = 6 * BYTES_PER_KB; - public static final BigInteger WEIBARS_IN_A_TINYBAR = BigInteger.valueOf(1L); + public static final BigInteger WEIBARS_IN_A_TINYBAR = BigInteger.valueOf(10_000_000_000L); // Useful for testing overflow scenarios when an ERC-20/721 ABI specifies // a uint256, but a valid value on Hedera will be an 8-byte long only public static final BigInteger MAX_UINT256_VALUE =