diff --git a/eosevm/consensus_parameters.cpp b/eosevm/consensus_parameters.cpp index 51c6fb93..cb0bb7b4 100644 --- a/eosevm/consensus_parameters.cpp +++ b/eosevm/consensus_parameters.cpp @@ -9,11 +9,12 @@ namespace eosevm { bool operator==(const eosevm::GasFeeParameters& a, const eosevm::GasFeeParameters& b) { return a.gas_codedeposit == b.gas_codedeposit && a.gas_newaccount == b.gas_newaccount && - a.gas_sset == b.gas_sset && a.gas_txcreate == b.gas_txcreate && a.gas_txnewaccount == b.gas_txnewaccount; + a.gas_sset == b.gas_sset && a.gas_txcreate == b.gas_txcreate && a.gas_txnewaccount == b.gas_txnewaccount; } bool operator==(const eosevm::ConsensusParameters& a, const eosevm::ConsensusParameters& b) { - return a.min_gas_price == b.min_gas_price && a.gas_fee_parameters == b.gas_fee_parameters; } + return a.gas_fee_parameters == b.gas_fee_parameters; +} #if not defined(ANTELOPE) @@ -43,14 +44,12 @@ std::optional GasFeeParameters::decode(silkworm::ByteView enco #if not defined(ANTELOPE) [[nodiscard]] silkworm::Bytes ConsensusParameters::encode() const noexcept { - SILKWORM_ASSERT(min_gas_price.has_value()); SILKWORM_ASSERT(gas_fee_parameters.has_value()); - constexpr size_t size_before_fee_param = 2 * sizeof(uint64_t); + constexpr size_t size_before_fee_param = sizeof(uint64_t); auto value = gas_fee_parameters->encode(); silkworm::Bytes ret(value.length() + size_before_fee_param, '\0'); // Always store as latest supported version: currently 0. silkworm::endian::store_big_u64(&ret[0], 0); - silkworm::endian::store_big_u64(&ret[sizeof(uint64_t)], *min_gas_price); std::memcpy(&ret[size_before_fee_param], &value[0], value.length()); return ret; }; @@ -63,9 +62,8 @@ std::optional ConsensusParameters::decode(silkworm::ByteVie // Parse according to version. For now, only 0. switch (version) { case 0: { - constexpr size_t size_before_fee_param = 2 * sizeof(uint64_t); + constexpr size_t size_before_fee_param = sizeof(uint64_t); SILKWORM_ASSERT(encoded.length() > size_before_fee_param); - config.min_gas_price = silkworm::endian::load_big_u64(&encoded[sizeof(uint64_t)]); config.gas_fee_parameters = GasFeeParameters::decode(silkworm::ByteView{&encoded[size_before_fee_param], encoded.length() - size_before_fee_param}); break; } @@ -82,4 +80,4 @@ std::optional ConsensusParameters::decode(silkworm::ByteVie } #endif -} // namespace eosevm \ No newline at end of file +} // namespace eosevm diff --git a/eosevm/consensus_parameters.hpp b/eosevm/consensus_parameters.hpp index 1994d86a..15838ccd 100644 --- a/eosevm/consensus_parameters.hpp +++ b/eosevm/consensus_parameters.hpp @@ -40,7 +40,6 @@ struct GasFeeParameters { }; struct ConsensusParameters { - std::optional min_gas_price; std::optional gas_fee_parameters; #if not defined(ANTELOPE) diff --git a/silkworm/node/db/access_layer_test.cpp b/silkworm/node/db/access_layer_test.cpp index 0c21438e..153904ce 100644 --- a/silkworm/node/db/access_layer_test.cpp +++ b/silkworm/node/db/access_layer_test.cpp @@ -919,7 +919,6 @@ TEST_CASE("ConsensusParameters") { auto& txn{context.rw_txn()}; constexpr eosevm::ConsensusParameters value1{ - .min_gas_price = 1, .gas_fee_parameters = eosevm::GasFeeParameters{ .gas_txnewaccount = 1, .gas_newaccount = 1, @@ -930,7 +929,6 @@ TEST_CASE("ConsensusParameters") { }; constexpr eosevm::ConsensusParameters value2{ - .min_gas_price = 2, .gas_fee_parameters = eosevm::GasFeeParameters{ .gas_txnewaccount = 2, .gas_newaccount = 2, diff --git a/silkworm/silkrpc/json/block.cpp b/silkworm/silkrpc/json/block.cpp index d6885acc..c663b5dc 100644 --- a/silkworm/silkrpc/json/block.cpp +++ b/silkworm/silkrpc/json/block.cpp @@ -51,9 +51,6 @@ void to_json(nlohmann::json& json, const Block& b) { if(b.consensus_parameter.has_value()) { auto& cp = b.consensus_parameter.value(); json["consensusParameter"] = nlohmann::json{}; - if(cp.min_gas_price.has_value()) { - json["consensusParameter"]["minGasPrice"] = cp.min_gas_price.value(); - } if(cp.gas_fee_parameters.has_value()) { json["consensusParameter"]["gasFeeParameters"] = nlohmann::json{}; auto& v = cp.gas_fee_parameters.value();