diff --git a/.github/workflows/build-and-test.ubuntu-debug.yml b/.github/workflows/build-and-test.ubuntu-debug.yml index 5e44e8ee8..2743ca0c7 100644 --- a/.github/workflows/build-and-test.ubuntu-debug.yml +++ b/.github/workflows/build-and-test.ubuntu-debug.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} services: elasticsearch8: - image: elastic/elasticsearch:8.8.1 + image: elastic/elasticsearch:8.9.1 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node @@ -22,7 +22,7 @@ jobs: --env cluster.routing.allocation.disk.threshold_enabled=false --publish 9200:9200 elasticsearch7: - image: elastic/elasticsearch:7.17.10 + image: elastic/elasticsearch:7.17.12 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node @@ -66,14 +66,14 @@ jobs: df -h . free mkdir -p _build - sudo mkdir -p /_build/libraries /_build/programs /_build/tests /mnt/_build - sudo chmod a+rwx /_build/libraries /_build/programs /_build/tests + sudo mkdir -p /_build/libraries /_build/programs /mnt/_build/tests + sudo chmod a+rwx /_build/libraries /_build/programs /mnt/_build/tests ln -s /_build/libraries _build/libraries ln -s /_build/programs _build/programs - ln -s /_build/tests _build/tests + ln -s /mnt/_build/tests _build/tests sudo ln -s /_build/libraries /mnt/_build/libraries sudo ln -s /_build/programs /mnt/_build/programs - sudo ln -s /_build/tests /mnt/_build/tests + sudo ln -s /mnt/_build/tests /_build/tests ls -al _build pushd _build export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR diff --git a/.github/workflows/build-and-test.ubuntu-release.yml b/.github/workflows/build-and-test.ubuntu-release.yml index 5fff3893d..1575f408c 100644 --- a/.github/workflows/build-and-test.ubuntu-release.yml +++ b/.github/workflows/build-and-test.ubuntu-release.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} services: elasticsearch8: - image: elastic/elasticsearch:8.8.1 + image: elastic/elasticsearch:8.9.1 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node @@ -22,7 +22,7 @@ jobs: --env cluster.routing.allocation.disk.threshold_enabled=false --publish 9200:9200 elasticsearch7: - image: elastic/elasticsearch:7.17.10 + image: elastic/elasticsearch:7.17.12 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node diff --git a/.github/workflows/build-and-test.win.yml b/.github/workflows/build-and-test.win.yml index 4151aa8ec..ad8bea77a 100644 --- a/.github/workflows/build-and-test.win.yml +++ b/.github/workflows/build-and-test.win.yml @@ -6,9 +6,9 @@ env: # The following are for windows cross-build only: BOOST_VERSION: 1_69_0 BOOST_DOTTED_VERSION: 1.69.0 - CURL_VERSION: 8.1.2 - OPENSSL_VERSION: 1.1.1u - ZLIB_VERSION: 1.2.13 + CURL_VERSION: 8.2.1 + OPENSSL_VERSION: 1.1.1v + ZLIB_VERSION: 1.3 jobs: prepare-mingw64-libs: name: Build required 3rd-party libraries diff --git a/.github/workflows/sonar-scan.yml b/.github/workflows/sonar-scan.yml index 820de552d..923bf5668 100644 --- a/.github/workflows/sonar-scan.yml +++ b/.github/workflows/sonar-scan.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} services: elasticsearch8: - image: elastic/elasticsearch:8.8.1 + image: elastic/elasticsearch:8.9.1 options: >- --env ES_JAVA_OPTS="-Xms512m -Xmx512m" --env discovery.type=single-node diff --git a/libraries/chain/db_market.cpp b/libraries/chain/db_market.cpp index 930de41a9..01043fcb8 100644 --- a/libraries/chain/db_market.cpp +++ b/libraries/chain/db_market.cpp @@ -1225,13 +1225,14 @@ database::match_result_type database::match_limit_settled_debt( const limit_orde wlog( "Unexpected scene: obj.for_sale > bitasset.individual_settlement_fund" ); obj.for_sale = bitasset.individual_settlement_fund; obj.sell_price = ~bitasset.get_individual_settlement_price(); - } // GCOVR_EXEL_STOP + } // GCOVR_EXCL_STOP } else { obj.for_sale = bitasset.individual_settlement_fund; obj.sell_price = ~bitasset.get_individual_settlement_price(); } + // Note: filled_amount is not updated, but it should be fine }); // Note: // After the price is updated, it is possible that the order can be matched with another order on the order @@ -1325,6 +1326,7 @@ database::match_result_type database::match_settled_debt_limit( const limit_orde obj.for_sale = bitasset.individual_settlement_fund; obj.sell_price = ~bitasset.get_individual_settlement_price(); } // GCOVR_EXCL_STOP + // Note: filled_amount is not updated, but it should be fine }); } @@ -1889,6 +1891,7 @@ bool database::fill_limit_order( const limit_order_object& order, const asset& p } modify( order, [&pays,&new_take_profit_order_id]( limit_order_object& b ) { b.for_sale -= pays.amount; + b.filled_amount += pays.amount.value; b.deferred_fee = 0; b.deferred_paid_fee.amount = 0; if( new_take_profit_order_id.valid() ) // A new take profit order is created, link it to this order diff --git a/libraries/chain/include/graphene/chain/config.hpp b/libraries/chain/include/graphene/chain/config.hpp index 9ac7aa723..24bdbfa55 100644 --- a/libraries/chain/include/graphene/chain/config.hpp +++ b/libraries/chain/include/graphene/chain/config.hpp @@ -32,7 +32,7 @@ #define GRAPHENE_MAX_NESTED_OBJECTS (200) -const std::string GRAPHENE_CURRENT_DB_VERSION = "20230529"; +const std::string GRAPHENE_CURRENT_DB_VERSION = "20230906"; #define GRAPHENE_RECENTLY_MISSED_COUNT_INCREMENT 4 #define GRAPHENE_RECENTLY_MISSED_COUNT_DECREMENT 3 diff --git a/libraries/chain/include/graphene/chain/market_object.hpp b/libraries/chain/include/graphene/chain/market_object.hpp index 4faa8e5c2..b04430585 100644 --- a/libraries/chain/include/graphene/chain/market_object.hpp +++ b/libraries/chain/include/graphene/chain/market_object.hpp @@ -45,10 +45,11 @@ using namespace graphene::db; class limit_order_object : public abstract_object { public: - time_point_sec expiration; - account_id_type seller; - share_type for_sale; ///< asset id is sell_price.base.asset_id - price sell_price; + time_point_sec expiration; ///< When this limit order will expire + account_id_type seller; ///< Who is selling + share_type for_sale; ///< The amount for sale, asset id is sell_price.base.asset_id + price sell_price; ///< The seller's asking price + fc::uint128_t filled_amount = 0; ///< The amount that has been sold, asset id is sell_price.base.asset_id share_type deferred_fee; ///< fee converted to CORE asset deferred_paid_fee; ///< originally paid fee bool is_settled_debt = false; ///< Whether this order is an individual settlement fund diff --git a/libraries/chain/market_object.cpp b/libraries/chain/market_object.cpp index bc78adb1d..9f9fc5357 100644 --- a/libraries/chain/market_object.cpp +++ b/libraries/chain/market_object.cpp @@ -308,7 +308,7 @@ share_type call_order_object::get_max_debt_to_cover( price match_price, FC_REFLECT_DERIVED_NO_TYPENAME( graphene::chain::limit_order_object, (graphene::db::object), - (expiration)(seller)(for_sale)(sell_price)(deferred_fee)(deferred_paid_fee) + (expiration)(seller)(for_sale)(sell_price)(filled_amount)(deferred_fee)(deferred_paid_fee) (is_settled_debt)(on_fill)(take_profit_order_id) ) diff --git a/libraries/fc b/libraries/fc index 2405393e4..33cd59ca4 160000 --- a/libraries/fc +++ b/libraries/fc @@ -1 +1 @@ -Subproject commit 2405393e40219b8ff3a87ccbcc3de14e32886dda +Subproject commit 33cd59ca4950542ee048b0be9f9f52ce26a863b3