diff --git a/.github/workflows/custom_build.yml b/.github/workflows/custom_build.yml index 79c039b04..93316c47a 100644 --- a/.github/workflows/custom_build.yml +++ b/.github/workflows/custom_build.yml @@ -25,126 +25,26 @@ on: default: RelWithDebInfo jobs: - main_job: - runs-on: self-hosted - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - BUILD_TYPE: ${{ github.event.inputs.build_type }} - steps: - - name: update apt - run: | - sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true - sudo apt-get update || true - - name: install packages - run: | - sudo apt-get -y remove libzmq* || true - sudo apt-get -y install software-properties-common gcc-9 g++-9 || true + core_build: + uses: ./.github/workflows/setup-build-publish.yml + with: + image_version: ${{ github.event.inputs.image_version }} + branch_name: ${{ github.event.inputs.branch_name }} + cmake_options: ${{ github.event.inputs.cmake_options }} + build_type: ${{ github.event.inputs.build_type }} + node_type: core + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} - - name: Use g++-9 and gcov-9 by default - run: | - echo "Updating all needed alternatives" - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 - sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9 - sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9 - sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9 - echo "Checking alternative for gcc" - which gcc - gcc --version - echo "Checking alternative for g++" - which g++ - g++ --version - echo "Checking alternative for gcov" - which gcov - gcov --version - echo "Checking alternative for gcov-dump" - which gcov-dump - gcov-dump --version - echo "Checking alternative for gcov-tool" - which gcov-tool - gcov-tool --version - - - name: Extract repo name - run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') - shell: bash - env: - ACTIONS_ALLOW_UNSECURE_COMMANDS: true - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: checkout - uses: actions/checkout@v2 - with: - ref: ${{ github.event.inputs.branch_name }} - - name: Submodule update - run: | - rm -rf ./libconsensus || true - ls -1 - git submodule update --init --recursive - - - name: Prepare ccache timestamp - id: ccache_cache_timestamp - shell: cmake -P {0} - run: | - string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) - message("::set-output name=timestamp::${current_date}") - - name: Ccache cache files - uses: actions/cache@v1.1.0 - with: - path: .ccache - key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } } - restore-keys: | - ${ { matrix.config.name } }-ccache- - - name: Build dependencies - run: | - export CC=gcc-9 - export CXX=g++-9 - export TARGET=all - export CMAKE_BUILD_TYPE=$BUILD_TYPE - [[ $CMAKE_BUILD_TYPE = "Debug" ]] && export DEBUG_FLAG=1 || export DEBUG_FLAG=0 - cd deps - ./clean.sh - rm -f ./libwebsockets-from-git.tar.gz - ./build.sh PARALLEL_COUNT=$(nproc) DEBUG=$DEBUG_FLAG - cd .. - - name: Configure all - run: | - export CC=gcc-9 - export CXX=g++-9 - export TARGET=all - export CMAKE_BUILD_TYPE=$BUILD_TYPE - mkdir -p build - cd build - cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE ${{ github.event.inputs.cmake_options }} .. - cd .. - - name: Build all - run: | - export CC=gcc-9 - export CXX=g++-9 - export TARGET=all - export CMAKE_BUILD_TYPE=$BUILD_TYPE - cd build - make skaled -j$(nproc) - #echo "Ensure release mode skaled does not have any debug markers" - #strip skaled/skaled - cd .. - - - name: Build and publish container - run: | - cp build/skaled/skaled scripts/skale_build/executable/ - export BRANCH=${{ github.event.inputs.branch_name }} - [[ $BUILD_TYPE = "Debug" ]] && export VERSION_SUFFIX=debug || export VERSION_SUFFIX=release - export VERSION=${{ github.event.inputs.image_version }}-$VERSION_SUFFIX - echo "Version $VERSION" - export RELEASE=true - bash ./scripts/build_and_publish.sh - - - name: Upload skaled binary as artifact - uses: actions/upload-artifact@v2 - if: ${{ always() }} - with: - name: skaled - path: ./build/skaled/skaled + historic_build: + uses: ./.github/workflows/setup-build-publish.yml + with: + image_version: ${{ github.event.inputs.image_version }} + branch_name: ${{ github.event.inputs.branch_name }} + cmake_options: ${{ github.event.inputs.cmake_options }} + build_type: ${{ github.event.inputs.build_type }} + node_type: historic + secrets: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} diff --git a/.github/workflows/setup-build-publish.yml b/.github/workflows/setup-build-publish.yml new file mode 100644 index 000000000..d1b15117f --- /dev/null +++ b/.github/workflows/setup-build-publish.yml @@ -0,0 +1,168 @@ +name: 'Setup, Build and Publish' +on: + workflow_call: + inputs: + branch_name: + type: string + description: 'Branch name' + required: true + image_version: + type: string + description: 'Image version for docker hub' + required: true + cmake_options: + type: string + description: 'Additional cmake options' + required: false + build_type: + type: string + description: 'Build type of skaled binary' + required: true + node_type: + type: string + description: 'Node type of skaled build' + required: true + secrets: + DOCKER_USERNAME: + required: true + DOCKER_PASSWORD: + required: true + +jobs: + main: + runs-on: self-hosted + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + BUILD_TYPE: ${{ inputs.build_type }} + steps: + - name: Prepare workflow variables + if: inputs.node_type != 'historic' + run: | + [[ $BUILD_TYPE = "Debug" ]] && export VERSION_SUFFIX=debug || export VERSION_SUFFIX=release + export VERSION=${{ inputs.image_version }}-$VERSION_SUFFIX + echo "VERSION=$VERSION" >> $GITHUB_ENV + export CMAKE_OPTS="${{ inputs.cmake_options }}" + echo "CMAKE_OPTS=$CMAKE_OPTS" >> $GITHUB_ENV + - name: Prepare workflow variables (historic) + if: inputs.node_type == 'historic' + run: | + [[ $BUILD_TYPE = "Debug" ]] && export VERSION_SUFFIX=debug || export VERSION_SUFFIX=release + export VERSION=${{ inputs.image_version }}-$VERSION_SUFFIX-historic + echo "VERSION=$VERSION" >> $GITHUB_ENV + export CMAKE_OPTS="-DHISTORIC_STATE=1 ${{ inputs.cmake_options }}" + echo "CMAKE_OPTS=$CMAKE_OPTS" >> $GITHUB_ENV + - name: update apt + run: | + sudo add-apt-repository ppa:ubuntu-toolchain-r/test || true + sudo apt-get update || true + - name: install packages + run: | + sudo apt-get -y remove libzmq* || true + sudo apt-get -y install software-properties-common gcc-9 g++-9 || true + + - name: Use g++-9 and gcov-9 by default + run: | + echo "Updating all needed alternatives" + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9 + sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-9 9 + sudo update-alternatives --install /usr/bin/gcov-dump gcov-dump /usr/bin/gcov-dump-9 9 + sudo update-alternatives --install /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-9 9 + echo "Checking alternative for gcc" + which gcc + gcc --version + echo "Checking alternative for g++" + which g++ + g++ --version + echo "Checking alternative for gcov" + which gcov + gcov --version + echo "Checking alternative for gcov-dump" + which gcov-dump + gcov-dump --version + echo "Checking alternative for gcov-tool" + which gcov-tool + gcov-tool --version + + - name: Extract repo name + run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}') + shell: bash + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true + - name: Extract branch name + shell: bash + run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" + id: extract_branch + - name: checkout + uses: actions/checkout@v2 + with: + ref: ${{ inputs.branch_name }} + - name: Submodule update + run: | + rm -rf ./libconsensus || true + ls -1 + git submodule update --init --recursive + + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("::set-output name=timestamp::${current_date}") + - name: Ccache cache files + uses: actions/cache@v1.1.0 + with: + path: .ccache + key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } } + restore-keys: | + ${ { matrix.config.name } }-ccache- + - name: Build dependencies + run: | + export CC=gcc-9 + export CXX=g++-9 + export TARGET=all + export CMAKE_BUILD_TYPE=$BUILD_TYPE + [[ $CMAKE_BUILD_TYPE = "Debug" ]] && export DEBUG_FLAG=1 || export DEBUG_FLAG=0 + cd deps + ./clean.sh + rm -f ./libwebsockets-from-git.tar.gz + ./build.sh PARALLEL_COUNT=$(nproc) DEBUG=$DEBUG_FLAG + cd .. + - name: Configure all + env: + CMAKE_OPTS: ${{ env.CMAKE_OPTS }} + run: | + export CC=gcc-9 + export CXX=g++-9 + export TARGET=all + export CMAKE_BUILD_TYPE=$BUILD_TYPE + mkdir -p build + cd build + cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE $CMAKE_OPTS .. + cd .. + - name: Build all + run: | + export CC=gcc-9 + export CXX=g++-9 + export TARGET=all + export CMAKE_BUILD_TYPE=$BUILD_TYPE + cd build + make skaled -j$(nproc) + cd .. + - name: Build and publish container + env: + VERSION: ${{ env.VERSION }} + run: | + cp build/skaled/skaled scripts/skale_build/executable/ + export BRANCH=${{ inputs.branch_name }} + export RELEASE=true + bash ./scripts/build_and_publish.sh + + - name: Upload skaled binary as artifact + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: skaled-${{ inputs.node_type }} + path: ./build/skaled/skaled diff --git a/libconsensus b/libconsensus index b1916ed05..9683c93ec 160000 --- a/libconsensus +++ b/libconsensus @@ -1 +1 @@ -Subproject commit b1916ed05c3b77f5925662fa591b9a054290d0fd +Subproject commit 9683c93ec19d4dd28724d9ec2e105677360918d1 diff --git a/libethereum/ClientBase.h b/libethereum/ClientBase.h index 96f769b5f..2790b4ee3 100644 --- a/libethereum/ClientBase.h +++ b/libethereum/ClientBase.h @@ -120,6 +120,7 @@ class ClientBase : public Interface { using Interface::blockInfo; // for another overload using Interface::transactionHashes; using Interface::uncle; + using Interface::uncleCount; using Interface::uncleHashes; h256 hashFromNumber( BlockNumber _number ) const override; @@ -152,7 +153,6 @@ class ClientBase : public Interface { } return transactionCount( hashFromNumber( _block ) ); } - using Interface::uncleCount; unsigned uncleCount( h256 _blockHash ) const override; unsigned number() const override; h256s pendingHashes() const override; diff --git a/libskale/broadcaster.cpp b/libskale/broadcaster.cpp index 195b055f9..20d15b232 100644 --- a/libskale/broadcaster.cpp +++ b/libskale/broadcaster.cpp @@ -97,8 +97,7 @@ void* ZmqBroadcaster::server_socket() const { val = 60000; zmq_setsockopt( m_zmq_server_socket, ZMQ_HEARTBEAT_TTL, &val, sizeof( val ) ); - // remove limits to prevent txns from being dropped out - val = 0; + val = 16; zmq_setsockopt( m_zmq_server_socket, ZMQ_SNDHWM, &val, sizeof( val ) ); @@ -132,7 +131,7 @@ void* ZmqBroadcaster::client_socket() const { value = 300; zmq_setsockopt( m_zmq_client_socket, ZMQ_TCP_KEEPALIVE_INTVL, &value, sizeof( value ) ); - value = 0; + value = 16; zmq_setsockopt( m_zmq_client_socket, ZMQ_RCVHWM, &value, sizeof( value ) ); const dev::eth::ChainParams& ch = m_client.chainParams(); diff --git a/libweb3jsonrpc/Eth.cpp b/libweb3jsonrpc/Eth.cpp index 11097c4fd..6fe5af509 100644 --- a/libweb3jsonrpc/Eth.cpp +++ b/libweb3jsonrpc/Eth.cpp @@ -602,7 +602,8 @@ Json::Value Eth::eth_getBlockByNumber( string const& _blockNumber, bool _include BlockNumber bn = ( h == LatestBlock || h == PendingBlock ) ? client()->number() : h; u256 baseFeePerGas; - if ( EIP1559TransactionsPatch::isEnabledWhen( client()->blockInfo( bn - 1 ).timestamp() ) ) + if ( bn > 0 && + EIP1559TransactionsPatch::isEnabledWhen( client()->blockInfo( bn - 1 ).timestamp() ) ) try { baseFeePerGas = client()->gasBidPrice( bn - 1 ); } catch ( std::invalid_argument& _e ) { @@ -962,7 +963,7 @@ Json::Value Eth::eth_createAccessList( return result; } -Json::Value Eth::eth_feeHistory( const std::string& _blockCount, const std::string& _newestBlock, +Json::Value Eth::eth_feeHistory( dev::u256 _blockCount, const std::string& _newestBlock, const Json::Value& _rewardPercentiles ) { try { if ( !_rewardPercentiles.isArray() ) @@ -974,8 +975,7 @@ Json::Value Eth::eth_feeHistory( const std::string& _blockCount, const std::stri } } - auto blockCount = jsToU256( _blockCount ); - if ( blockCount > MAX_BLOCK_RANGE ) + if ( _blockCount > MAX_BLOCK_RANGE ) throw std::runtime_error( "Max block range reached. Please try smaller blockCount." ); auto newestBlock = jsToBlockNumber( _newestBlock ); @@ -984,10 +984,10 @@ Json::Value Eth::eth_feeHistory( const std::string& _blockCount, const std::stri auto result = Json::Value( Json::objectValue ); dev::u256 oldestBlock; - if ( blockCount > newestBlock ) + if ( _blockCount > newestBlock ) oldestBlock = 1; else - oldestBlock = dev::u256( newestBlock ) - blockCount + 1; + oldestBlock = dev::u256( newestBlock ) - _blockCount + 1; result["oldestBlock"] = toJS( oldestBlock ); result["baseFeePerGas"] = Json::Value( Json::arrayValue ); diff --git a/libweb3jsonrpc/Eth.h b/libweb3jsonrpc/Eth.h index 2ecf0be5d..ae4c011f2 100644 --- a/libweb3jsonrpc/Eth.h +++ b/libweb3jsonrpc/Eth.h @@ -219,7 +219,7 @@ class Eth : public dev::rpc::EthFace, public skutils::json_config_file_accessor virtual Json::Value eth_createAccessList( const Json::Value& param1, const std::string& param2 ) override; virtual Json::Value eth_feeHistory( - const std::string& param1, const std::string& param2, const Json::Value& param3 ) override; + dev::u256 param1, const std::string& param2, const Json::Value& param3 ) override; virtual std::string eth_maxPriorityFeePerGas() override; void setTransactionDefaults( eth::TransactionSkeleton& _t ); diff --git a/libweb3jsonrpc/EthFace.h b/libweb3jsonrpc/EthFace.h index c87edf57b..a7f7991c8 100644 --- a/libweb3jsonrpc/EthFace.h +++ b/libweb3jsonrpc/EthFace.h @@ -7,6 +7,7 @@ #include "ModularServer.h" +#include #include #include @@ -222,8 +223,7 @@ class EthFace : public ServerInterface< EthFace > { jsonrpc::JSON_OBJECT, "param2", jsonrpc::JSON_STRING, NULL ), &dev::rpc::EthFace::eth_createAccessListI ); this->bindAndAddMethod( jsonrpc::Procedure( "eth_feeHistory", jsonrpc::PARAMS_BY_POSITION, - jsonrpc::JSON_OBJECT, "param1", jsonrpc::JSON_STRING, "param2", - jsonrpc::JSON_STRING, "param3", jsonrpc::JSON_ARRAY, NULL ), + jsonrpc::JSON_OBJECT, NULL ), &dev::rpc::EthFace::eth_feeHistoryI ); this->bindAndAddMethod( jsonrpc::Procedure( "eth_maxPriorityFeePerGas", jsonrpc::PARAMS_BY_POSITION, jsonrpc::JSON_STRING, NULL ), @@ -449,8 +449,12 @@ class EthFace : public ServerInterface< EthFace > { if ( !request.isArray() || request.size() != 3 ) BOOST_THROW_EXCEPTION( jsonrpc::JsonRpcException( jsonrpc::Errors::ERROR_RPC_INVALID_PARAMS ) ); - response = - this->eth_feeHistory( request[0u].asString(), request[1u].asString(), request[2u] ); + if ( !request[0u].isString() && !request[0u].isUInt() ) + BOOST_THROW_EXCEPTION( + jsonrpc::JsonRpcException( jsonrpc::Errors::ERROR_RPC_INVALID_PARAMS ) ); + auto blockCount = request[0u].isString() ? dev::jsToU256( request[0u].asString() ) : + dev::u256( request[0u].asUInt() ); + response = this->eth_feeHistory( blockCount, request[1u].asString(), request[2u] ); } inline virtual void eth_maxPriorityFeePerGasI( const Json::Value& request, Json::Value& response ) { @@ -525,7 +529,7 @@ class EthFace : public ServerInterface< EthFace > { virtual Json::Value eth_createAccessList( const Json::Value& param1, const std::string& param2 ) = 0; virtual Json::Value eth_feeHistory( - const std::string& param1, const std::string& param2, const Json::Value& param3 ) = 0; + dev::u256 param1, const std::string& param2, const Json::Value& param3 ) = 0; virtual std::string eth_maxPriorityFeePerGas() = 0; }; diff --git a/test/unittests/libethereum/ClientTest.cpp b/test/unittests/libethereum/ClientTest.cpp index ed9bdb878..9cc2e0b93 100644 --- a/test/unittests/libethereum/ClientTest.cpp +++ b/test/unittests/libethereum/ClientTest.cpp @@ -39,7 +39,7 @@ using namespace dev::test; using namespace dev::p2p; namespace fs = boost::filesystem; -static size_t rand_port = 1024 + rand() % 64000; +static size_t rand_port = ( srand(time(nullptr)), 1024 + rand() % 64000 ); struct FixtureCommon { const string BTRFS_FILE_PATH = "btrfs.file"; diff --git a/test/unittests/libweb3jsonrpc/WebThreeStubClient.cpp b/test/unittests/libweb3jsonrpc/WebThreeStubClient.cpp index 6891aacef..c297164dc 100644 --- a/test/unittests/libweb3jsonrpc/WebThreeStubClient.cpp +++ b/test/unittests/libweb3jsonrpc/WebThreeStubClient.cpp @@ -842,9 +842,12 @@ Json::Value WebThreeStubClient::eth_createAccessList( const Json::Value& param1, jsonrpc::Errors::ERROR_CLIENT_INVALID_RESPONSE, result.toStyledString() ); } -Json::Value WebThreeStubClient::eth_feeHistory( const std::string& param1, const std::string& param2, const Json::Value& param3 ) { +Json::Value WebThreeStubClient::eth_feeHistory( const Json::Value& param1, const std::string& param2, const Json::Value& param3 ) { Json::Value p; - p.append( param1 ); + if ( param1.isString() ) + p.append( param1.asString() ); + if ( param1.isUInt() ) + p.append( param1.asUInt() ); p.append( param2 ); p.append( param3 ); Json::Value result = this->CallMethod( "eth_feeHistory", p ); diff --git a/test/unittests/libweb3jsonrpc/WebThreeStubClient.h b/test/unittests/libweb3jsonrpc/WebThreeStubClient.h index 2be6ca519..9125b97ab 100644 --- a/test/unittests/libweb3jsonrpc/WebThreeStubClient.h +++ b/test/unittests/libweb3jsonrpc/WebThreeStubClient.h @@ -5,6 +5,8 @@ #ifndef JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_ #define JSONRPC_CPP_STUB_WEBTHREESTUBCLIENT_H_ +#include + #include class WebThreeStubClient : public jsonrpc::Client { @@ -98,7 +100,7 @@ class WebThreeStubClient : public jsonrpc::Client { std::string eth_sendRawTransaction( const std::string& param1 ) noexcept( false ); std::string eth_maxPriorityFeePerGas() noexcept( false ); Json::Value eth_createAccessList( const Json::Value& param1, const std::string& param2 ) noexcept( false ); - Json::Value eth_feeHistory( const std::string& param1, const std::string& param2, const Json::Value& param3 ) noexcept( false ); + Json::Value eth_feeHistory( const Json::Value& param1, const std::string& param2, const Json::Value& param3 ) noexcept( false ); bool eth_notePassword( const std::string& param1 ) noexcept( false ); bool db_put( const std::string& param1, const std::string& param2, const std::string& param3 ) noexcept( false ); diff --git a/test/unittests/libweb3jsonrpc/jsonrpc.cpp b/test/unittests/libweb3jsonrpc/jsonrpc.cpp index c004aaf6d..c955130e6 100644 --- a/test/unittests/libweb3jsonrpc/jsonrpc.cpp +++ b/test/unittests/libweb3jsonrpc/jsonrpc.cpp @@ -380,7 +380,8 @@ JsonRpcFixture( const std::string& _config = "", bool _owner = true, serverOpts.netOpts_.bindOptsStandard_.cntServers_ = 1; serverOpts.netOpts_.bindOptsStandard_.strAddrHTTP4_ = chainParams.nodeInfo.ip; // random port - serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ = std::rand() % 64000 + 1025; + // +3 because rand() seems to be called effectively simultaneously here and in "static" section - thus giving same port for consensus + serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ = std::rand() % 64000 + 1025 + 3; std::cout << "PORT: " << serverOpts.netOpts_.bindOptsStandard_.nBasePortHTTP4_ << std::endl; skale_server_connector = new SkaleServerOverride( chainParams, client.get(), serverOpts ); rpcServer->addConnector( skale_server_connector ); @@ -846,7 +847,7 @@ BOOST_AUTO_TEST_CASE( simple_contract ) { // } // } - string compiled = + string compiled = "608060405234801561001057600080fd5b506101ef8061002060003" "96000f3fe608060405234801561001057600080fd5b506004361061" "00365760003560e01c8063552410771461003b578063b3de648b146" @@ -3133,6 +3134,8 @@ BOOST_AUTO_TEST_CASE( eip1559Transactions ) { BOOST_REQUIRE( result["accessList"].isArray() ); BOOST_REQUIRE( result["maxPriorityFeePerGas"] == "0x4a817c800" ); BOOST_REQUIRE( result["maxFeePerGas"] == "0x4a817c800" ); + + BOOST_REQUIRE_NO_THROW( fixture.rpcClient->eth_getBlockByNumber( "0x0", false ) ); } BOOST_AUTO_TEST_CASE( eip2930RpcMethods ) { @@ -3226,6 +3229,8 @@ BOOST_AUTO_TEST_CASE( eip1559RpcMethods ) { BOOST_REQUIRE_EQUAL( feeHistory["reward"][i][j].asString(), toJS( 0 ) ); } } + + BOOST_REQUIRE_NO_THROW( fixture.rpcClient->eth_feeHistory( blockCnt, "latest", percentiles ) ); } BOOST_AUTO_TEST_CASE( etherbase_generation2 ) { @@ -4075,7 +4080,7 @@ BOOST_AUTO_TEST_CASE( cached_filestorage ) { auto _config = c_genesisConfigString; Json::Value ret; Json::Reader().parse( _config, ret ); - ret["skaleConfig"]["sChain"]["revertableFSPatchTimestamp"] = 1; + ret["skaleConfig"]["sChain"]["revertableFSPatchTimestamp"] = 1; Json::FastWriter fastWriter; std::string config = fastWriter.write( ret ); RestrictedAddressFixture fixture( config );