Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge hardfork branch into release branch for 7.0.0 release #2751

Merged
merged 178 commits into from
Jul 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
61d85de
Progress #1604: Basic implementation
nathanielhourt Feb 21, 2019
f6bbe4b
Progress #1604: Tests and Fixes
nathanielhourt Feb 22, 2019
5484c9f
Ref #1604: Add matching logic
nathanielhourt Feb 22, 2019
3d24f7c
Progress #1604: Add dust check
nathanielhourt Feb 26, 2019
073ecbe
Progress #1604: Add hardfork guards
nathanielhourt Feb 26, 2019
a34c855
Ref #1604: Another test case
nathanielhourt Feb 26, 2019
fba5bac
Progress #1604: Do not allow sooner expiration
nathanielhourt Feb 27, 2019
8a82d92
Add fee_schedule::exists<op_type>()
nathanielhourt Feb 27, 2019
6180946
Ref #1604: Add missing hardfork guard
nathanielhourt Feb 27, 2019
55dc688
Eliminate variable fee
nathanielhourt Oct 7, 2019
f7b2547
Update SonarScanner config for hardfork branch
abitmore Dec 17, 2021
5550b40
Merge pull request #2563 from bitshares/develop-to-hardfork
abitmore Dec 17, 2021
b304021
Update sonar.branch.target for develop branch
abitmore Dec 2, 2022
456fe19
Refactor login_api::login(), fix code smells
abitmore Dec 3, 2022
9d3de7d
Merge pull request #2700 from bitshares/merge-release-develop
abitmore Dec 3, 2022
4b2de74
Merge pull request #2701 from bitshares/develop
abitmore Dec 4, 2022
9757d82
Update default value of market hist plugin options
abitmore Dec 4, 2022
d64b0dc
Update default Docker config about market history
abitmore Dec 4, 2022
95c5a53
delinting
litepresence Dec 4, 2022
d3b18fe
Merge pull request #2705 from bitshares/litepresence-patch-1
abitmore Dec 6, 2022
bba2e79
Merge pull request #2702 from bitshares/update-bucket
abitmore Dec 6, 2022
216da75
Use ES 8.5.3 in Github Actions, remove Ubuntu 18
abitmore Dec 9, 2022
93d70ab
Fix ElasticSearch version 8 compatibility
abitmore Jan 7, 2023
eab0b04
Check response content when deleting, add logging
abitmore Jan 7, 2023
20a3800
Remove the elasticsearch_suite test case
abitmore Jan 7, 2023
ec9d712
Add tests for es_plugin::get_operation_by_id()
abitmore Jan 8, 2023
3cf8df8
Add logging about ElasticSearch version detection
abitmore Jan 9, 2023
6e0e232
Merge pull request #2707 from bitshares/support-es8
abitmore Jan 9, 2023
9948390
Limit Java heap size for ES services to 512M in CI
abitmore Jan 9, 2023
40a13a1
Use make -j2 or -j3 in Github Actions workflows
abitmore Jan 10, 2023
f5a57f6
Merge pull request #2709 from bitshares/fix-ubuntu-release-build
abitmore Jan 10, 2023
5aaef87
Update project description and a link
abitmore Jan 11, 2023
d018955
Merge branch 'hardfork' into update-sonar-hf
abitmore Jan 11, 2023
1014956
Merge pull request #2714 from bitshares/update-sonar
abitmore Jan 11, 2023
55028ac
Merge pull request #2715 from bitshares/update-sonar-hf
abitmore Jan 11, 2023
996bb3d
Merge pull request #2713 from bitshares/develop
abitmore Jan 11, 2023
ff39fb5
Allow settling more than indvd fund when no feed
abitmore Jan 22, 2023
e4878a3
Merge pull request #2716 from bitshares/pr-2587-settle-without-feed
abitmore Jan 23, 2023
eb0e5ce
Fix network_mapper
abitmore Jan 26, 2023
d6c493d
Merge pull request #2718 from bitshares/fix-network-mapper
abitmore Jan 27, 2023
715b212
Add liquidity_pool_update_operation
abitmore Jan 24, 2023
cd10dc5
Add tests for liquidity_pool_update_operation
abitmore Jan 27, 2023
6c31d61
Merge pull request #2719 from bitshares/develop
abitmore Jan 27, 2023
865ae5d
Update default fee of lp_update_op
abitmore Jan 28, 2023
011b523
Update an assertion message
abitmore Jan 28, 2023
2d93201
Merge pull request #2720 from bitshares/pr-2604-liquidity-pool-update
abitmore Jan 29, 2023
9e6325f
Pay force-settlement from settlement funds at MCOP
abitmore Jan 29, 2023
6572b08
Add tests for price paid by indvd settlement fund
abitmore Jan 30, 2023
822adcd
Bump docker/build-push-action from 3 to 4
abitmore Jan 31, 2023
fafdc9c
Merge pull request #2722 from bitshares/update-docker-action
abitmore Feb 1, 2023
763a140
Merge pull request #2723 from bitshares/develop
abitmore Feb 1, 2023
7b92891
Use ES version 8.6.1 and 7.17.9 in Github Actions
abitmore Feb 3, 2023
1ea6578
Add tests for price paid by global settlement fund
abitmore Feb 3, 2023
4b0c7a4
Merge pull request #2724 from bitshares/update-es-version
abitmore Feb 4, 2023
2f1e507
Bump another docker/build-push-action from 3 to 4
abitmore Feb 4, 2023
594b19c
Merge pull request #2726 from bitshares/update-docker
abitmore Feb 5, 2023
a3e34dd
Merge pull request #2725 from bitshares/develop
abitmore Feb 6, 2023
247bb8f
Refactor limit_order_obj for indvd_settle_to_order
abitmore Feb 22, 2023
dd7bbe3
Update settled-debt order when median feed updated
abitmore Feb 23, 2023
b1b7167
Pay fee when settled-debt order is filled as maker
abitmore Feb 23, 2023
5183773
Check price when individually settling to order
abitmore Feb 23, 2023
bd1b2fa
Process settled-debt order in check_call_orders()
abitmore Feb 24, 2023
dfc71de
Extend individual_settlement_test for core-2591 hf
abitmore Feb 24, 2023
5fc7ee1
Update tests taking settled-debt order for hf 2591
abitmore Feb 24, 2023
404c1ce
Update try-catch in a test case
abitmore Feb 24, 2023
c390977
Fix a number in comments in test cases
abitmore Feb 25, 2023
2b2ca4b
Add tests that settled-debt order matches as taker
abitmore Feb 25, 2023
a6dcc1a
Merge pull request #2721 from bitshares/pr-2591-force-settle-price
abitmore Mar 5, 2023
8afc448
Skip prediction markets when paying collateral fee
abitmore Mar 10, 2023
eb45cc1
Fix global settlement when have settled-debt order
abitmore Mar 10, 2023
08a55e6
Update manual_gs_test for core-2591 hard fork
abitmore Mar 12, 2023
338de92
Add tests for PM instant-settlement price
abitmore Mar 12, 2023
0b2dd8e
Merge pull request #2727 from bitshares/pr-2591-fix-gs
abitmore Mar 13, 2023
3b8913b
Save the result of virtual limit_order_cancel op
abitmore Mar 19, 2023
e60d9e1
Bump DB_VERSION
abitmore Mar 19, 2023
778fa64
Add `is_virtual` field in account history in ES
abitmore Mar 19, 2023
56b8d19
Fix missing data in es_plugin::get_account_history
abitmore Mar 19, 2023
637a414
Update license year to 2023
abitmore Mar 19, 2023
40be62a
Add tests for virtual limit_order_cancel op result
abitmore Mar 19, 2023
bfa0401
Add tests for es_plugin::get_acc_his missing data
abitmore Mar 19, 2023
c3a1e40
Set a timeout for running unit tests in Github CI
abitmore Mar 19, 2023
026ba80
Merge pull request #2731 from bitshares/update-license-year-2023
abitmore Mar 19, 2023
b810d59
Merge pull request #2732 from bitshares/workflow-timeout
abitmore Mar 20, 2023
d50e2db
Merge pull request #2729 from bitshares/order-cancel-vop-result
abitmore Mar 20, 2023
d226bd9
Merge branch 'develop' into is-virtual-field-in-es
abitmore Mar 20, 2023
887203c
Bump DB_VERSION
abitmore Mar 20, 2023
dfd22b1
Merge pull request #2730 from bitshares/is-virtual-field-in-es
abitmore Mar 20, 2023
3176f6d
Merge branch 'hardfork' into develop-to-hardfork
abitmore Mar 20, 2023
1496be5
Merge pull request #2733 from bitshares/develop-to-hardfork
abitmore Mar 20, 2023
bba9b4a
Implement credit deal auto-repayment
abitmore Mar 19, 2023
cb4bc4a
Add tests for credit deal auto-repayment
abitmore Mar 22, 2023
5704816
Optimize processing of virutal operations
abitmore Mar 22, 2023
68efc09
Fix _current_virtual_op in push_proposal
abitmore Mar 22, 2023
e8fac66
Add tests for credit deal auto-repayment history
abitmore Mar 22, 2023
8a64036
Update params in credit deal auto-repayment tests
abitmore Mar 22, 2023
52d676a
Try to fix MinGW build with -Wa,-mbig-obj
abitmore Mar 22, 2023
bf5934f
Set VERBOSE=1 when making with MinGW in CI
abitmore Mar 22, 2023
d069614
Rename fee_parameters_type to fee_params_t
abitmore Mar 23, 2023
b7a5d68
Update a comment
abitmore Mar 23, 2023
2ca1d99
Update a comment
abitmore Mar 23, 2023
a89307c
Wrap long lines
abitmore Mar 24, 2023
9c0ad9b
Remove SonarCloud cache and threads configurtion as it is now by default
mpaladin Mar 24, 2023
43ea51e
Merge pull request #2736 from mpaladin/sonarcloud-configuration
abitmore Mar 24, 2023
5d59c9e
Add comments
abitmore Mar 24, 2023
70eece1
Merge pull request #2737 from bitshares/sonarcloud-configuration
abitmore Mar 25, 2023
b46de5d
Use gcovr to process code coverage data
abitmore Mar 29, 2023
11b2a81
Bump FC
abitmore Mar 29, 2023
f927efc
Fix macOS build
abitmore Mar 30, 2023
162584a
Merge pull request #2739 from bitshares/sonar-code-coverage
abitmore Mar 30, 2023
beb5022
Merge branch 'develop'
abitmore Mar 30, 2023
4f66004
Update sonar.projectVersion to 6.2.x
abitmore Mar 30, 2023
e68c738
Merge pull request #2740 from bitshares/update-sonar-project-version-…
abitmore Mar 30, 2023
d1da353
Remove mostly useless try/catch wrappers
abitmore Mar 31, 2023
5366a79
Call gcovr with --exclude-throw-branches in CI
abitmore Mar 31, 2023
3da7891
Exclude programs and tests from coverage reports
abitmore Mar 31, 2023
3f5c6c4
Merge pull request #2742 from bitshares/update-sonar
abitmore Apr 1, 2023
38ff734
Merge 'develop' branch
abitmore Apr 1, 2023
3fc4de4
Add fee_change_test
abitmore Apr 19, 2023
d441b3e
Merge pull request #2735 from bitshares/pr-2595-credit-auto-repay
abitmore Apr 19, 2023
a71cfe4
Merge hardfork branch, fix build and tests
abitmore Apr 29, 2023
a03b4ce
Fix issues about limit_order_update_evaluator
abitmore May 8, 2023
44e6de4
Do not allow inappropriate price manipulation
abitmore May 9, 2023
2387df3
Remove redundant checks for order matching
abitmore May 9, 2023
2b3bcd3
Remove redundant checks for account balance
abitmore May 9, 2023
e8e9d0d
Simplify try-catch wrappers in tests
abitmore May 9, 2023
136007e
Update tests to adapt code changes
abitmore May 10, 2023
cf2fca6
Remove mostly useless try/catch wrappers
abitmore May 10, 2023
9160a7e
Add tests for limit_order_update_operation
abitmore May 10, 2023
c58db0b
Fix potential dereferencing issues in tests
abitmore May 10, 2023
85bef43
Add asset authorization tests for order_update op
abitmore May 10, 2023
afcff0d
Update a comment and an assertion message
abitmore May 10, 2023
dfce7c6
Update default order update fee
abitmore May 11, 2023
8898b5a
Process operation fees
abitmore May 11, 2023
269a16d
Reduce log level of exceptions in order_update_op
abitmore May 11, 2023
032f125
Update a comment
abitmore May 12, 2023
663ecd9
Move deferred fee processing code into a function
abitmore May 12, 2023
d381110
Add tests for order_update fee if paid in CORE
abitmore May 12, 2023
1195df5
Add tests for order_update fee if not paid in CORE
abitmore May 12, 2023
2a34e1b
Update variable names to fix variable shadowing
abitmore May 15, 2023
126987e
Update a comment
abitmore May 15, 2023
1f66802
Merge pull request #2743 from bitshares/issue-1604
abitmore May 15, 2023
6636959
Fix code smells
abitmore May 16, 2023
b26d877
Add tests for virtual operation fees
abitmore May 16, 2023
2906a69
Add GCOVR_EXCL_LINE for FC_CAPTURE_AND_RETHROW
abitmore May 16, 2023
a4dfd53
Merge pull request #2745 from bitshares/fix-coverage
abitmore May 17, 2023
113418e
Add GCOVR_EXCL_LINE for FC_CAPTURE_AND_RETHROW
abitmore May 20, 2023
ecc0da4
Add tests for object_id and object_id_type
abitmore May 20, 2023
1401ea6
Merge pull request #2747 from bitshares/fix-code-smells
abitmore May 21, 2023
4b87ba8
Rename functions has_settlement() and has_indiv...
abitmore May 27, 2023
92041b8
Refactor code about individual settlement order
abitmore May 27, 2023
37c5853
Update some assertion messages
abitmore May 27, 2023
f8d5e8d
Add GCOVR exclusion markers around defensive code
abitmore May 27, 2023
061594f
Update comments
abitmore May 28, 2023
38dbc61
Merge pull request #2748 from bitshares/settlement-code-refactory
abitmore May 29, 2023
240a84a
Implement Order-Sends-Take-Profit-Order feature
abitmore May 29, 2023
78816b7
Add tests for take profit order feature
abitmore Jun 13, 2023
de8339d
Remove unused code
abitmore Jun 14, 2023
1afd436
Adapt on_fill field (for limit orders) for ES
abitmore Jun 17, 2023
ad0a5b5
Catch more exceptions when processing on_fill
abitmore Jun 17, 2023
ec47739
Add tests for failure to send take profit order
abitmore Jun 17, 2023
9a36b7c
Merge pull request #2749 from bitshares/pr-2535-oso
abitmore Jun 19, 2023
ed08a9b
Improve performance of account history wallet APIs
abitmore Sep 16, 2022
f024d42
Merge pull request #2644 from bitshares/pr-2643-cli-acc-hist-time
abitmore Jun 19, 2023
e49788d
Merge pull request #2750 from bitshares/develop
abitmore Jun 20, 2023
481b67e
Use ES version 8.8.1 and 7.17.10 in Github Actions
abitmore Jun 21, 2023
a0e1b28
Update CURL version used in CI to 8.1.2
abitmore Jun 21, 2023
e4ef0a4
Update OpenSSL version used in CI to 1.1.1u
abitmore Jun 21, 2023
a3caf53
Merge pull request #2752 from bitshares/update-versions-in-ci
abitmore Jun 21, 2023
dff65c3
Merge pull request #2753 from bitshares/develop
abitmore Jun 22, 2023
b99d62f
Fix a comment in a test case
abitmore Jun 24, 2023
16c7798
Fix a test case
abitmore Jun 24, 2023
7548e6b
Merge pull request #2754 from bitshares/update-comment
abitmore Jun 24, 2023
c6c7767
Merge pull request #2755 from bitshares/fix-tests
abitmore Jun 25, 2023
2105165
Fix a comment in a test case
abitmore Jul 1, 2023
29553e3
Fix a test case about updating limit orders
abitmore Jul 1, 2023
4d6e7cc
Merge pull request #2757 from bitshares/update-comment
abitmore Jul 1, 2023
3d64cf0
Merge pull request #2758 from bitshares/update-tests
abitmore Jul 1, 2023
c7c5ac5
Update sonar.branch.target for release branch
abitmore Jun 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/build-and-test.mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ jobs:
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build witness_node cli_wallet app_test cli_test chain_test
make -j 3 -C _build witness_node cli_wallet app_test cli_test chain_test
df -h
- name: Unit-Tests
timeout-minutes: 15
run: |
_build/tests/app_test -l test_suite
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l test_suite
Expand Down
47 changes: 28 additions & 19 deletions .github/workflows/build-and-test.ubuntu-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,26 @@ jobs:
name: Build and test in Debug mode
strategy:
matrix:
os: [ ubuntu-18.04, ubuntu-20.04 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
services:
elasticsearch:
image: docker://elasticsearch:7.17.7
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
elasticsearch8:
image: elastic/elasticsearch:8.8.1
options: >-
--env ES_JAVA_OPTS="-Xms512m -Xmx512m"
--env discovery.type=single-node
--env xpack.security.enabled=false
--env xpack.security.http.ssl.enabled=false
--env action.destructive_requires_name=false
--env cluster.routing.allocation.disk.threshold_enabled=false
--publish 9200:9200
elasticsearch7:
image: elastic/elasticsearch:7.17.10
options: >-
--env ES_JAVA_OPTS="-Xms512m -Xmx512m"
--env discovery.type=single-node
--env cluster.routing.allocation.disk.threshold_enabled=false
--publish 9201:9200
steps:
- name: Install dependencies
run: |
Expand Down Expand Up @@ -51,11 +65,6 @@ jobs:
pwd
df -h .
free
sudo dd if=/dev/zero of=/swapfile bs=1024 count=4M
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
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
Expand Down Expand Up @@ -89,25 +98,25 @@ jobs:
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
df -h
make -j 1 -C _build chain_test
make -j 1 -C _build cli_test
make -j 1 -C _build app_test
make -j 1 -C _build es_test
make -j 1 -C _build cli_wallet
make -j 1 -C _build witness_node
make -j 1 -C _build
make -j 2 -C _build chain_test
make -j 2 -C _build cli_test
make -j 2 -C _build app_test
make -j 2 -C _build es_test
make -j 2 -C _build cli_wallet
make -j 2 -C _build witness_node
make -j 2 -C _build
df -h
du -hs _build/libraries/* _build/programs/* _build/tests/*
du -hs _build/*
du -hs /_build/*
- name: Unit-Tests
timeout-minutes: 15
run: |
_build/tests/app_test -l test_suite
df -h
rm -rf /tmp/graphene*
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
echo
_build/tests/es_test -l test_suite
export GRAPHENE_TESTING_ES_URL=http://127.0.0.1:9201/
_build/tests/es_test -l test_suite
df -h
rm -rf /tmp/graphene*
Expand Down
32 changes: 24 additions & 8 deletions .github/workflows/build-and-test.ubuntu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,26 @@ jobs:
name: Build and test in Release mode
strategy:
matrix:
os: [ ubuntu-18.04, ubuntu-20.04 ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
services:
elasticsearch:
image: docker://elasticsearch:7.17.7
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
elasticsearch8:
image: elastic/elasticsearch:8.8.1
options: >-
--env ES_JAVA_OPTS="-Xms512m -Xmx512m"
--env discovery.type=single-node
--env xpack.security.enabled=false
--env xpack.security.http.ssl.enabled=false
--env action.destructive_requires_name=false
--env cluster.routing.allocation.disk.threshold_enabled=false
--publish 9200:9200
elasticsearch7:
image: elastic/elasticsearch:7.17.10
options: >-
--env ES_JAVA_OPTS="-Xms512m -Xmx512m"
--env discovery.type=single-node
--env cluster.routing.allocation.disk.threshold_enabled=false
--publish 9201:9200
steps:
- name: Install dependencies
run: |
Expand Down Expand Up @@ -45,6 +59,8 @@ jobs:
submodules: recursive
- name: Configure
run: |
df -h
free
mkdir -p _build
pushd _build
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
Expand All @@ -68,14 +84,14 @@ jobs:
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 1 -C _build
make -j 2 -C _build
df -h
- name: Unit-Tests
timeout-minutes: 15
run: |
_build/tests/app_test -l test_suite
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
echo
_build/tests/es_test -l test_suite
export GRAPHENE_TESTING_ES_URL=http://127.0.0.1:9201/
_build/tests/es_test -l test_suite
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l test_suite
_build/tests/cli_test -l test_suite
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-and-test.win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ env:
# The following are for windows cross-build only:
BOOST_VERSION: 1_69_0
BOOST_DOTTED_VERSION: 1.69.0
CURL_VERSION: 7.86.0
OPENSSL_VERSION: 1.1.1s
CURL_VERSION: 8.1.2
OPENSSL_VERSION: 1.1.1u
ZLIB_VERSION: 1.2.13
jobs:
prepare-mingw64-libs:
Expand Down Expand Up @@ -154,4 +154,4 @@ jobs:
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build witness_node cli_wallet
make VERBOSE=1 -j 2 -C _build witness_node cli_wallet
6 changes: 3 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build only
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
load: true
Expand All @@ -46,14 +46,14 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Push to DockerHub (for branches)
if: env.DOCKER_PUSH_TAG != '' && env.DOCKER_PUSH_TAG_SHORT == ''
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ secrets.DOCKERHUB_REPO_PATH }}:${{ env.DOCKER_PUSH_TAG }}
- name: Push to DockerHub (for tags)
if: env.DOCKER_PUSH_TAG != '' && env.DOCKER_PUSH_TAG_SHORT != ''
uses: docker/build-push-action@v3
uses: docker/build-push-action@v4
with:
context: .
push: true
Expand Down
50 changes: 20 additions & 30 deletions .github/workflows/sonar-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,16 @@ jobs:
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
services:
elasticsearch:
image: docker://elasticsearch:7.17.7
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300
elasticsearch8:
image: elastic/elasticsearch:8.8.1
options: >-
--env ES_JAVA_OPTS="-Xms512m -Xmx512m"
--env discovery.type=single-node
--env xpack.security.enabled=false
--env xpack.security.http.ssl.enabled=false
--env action.destructive_requires_name=false
--env cluster.routing.allocation.disk.threshold_enabled=false
--publish 9200:9200
steps:
- name: Download and install latest SonarScanner CLI tool
run: |
Expand Down Expand Up @@ -43,6 +50,7 @@ jobs:
sudo apt-get install -y --allow-downgrades openssl=${openssl_ver} libssl-dev=${libssl_ver}
sudo apt-get install -y \
ccache \
gcovr \
parallel \
libboost-thread-dev \
libboost-iostreams-dev \
Expand Down Expand Up @@ -70,11 +78,6 @@ jobs:
pwd
df -h .
free
sudo dd if=/dev/zero of=/swapfile bs=1024 count=4M
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
free
mkdir -p _build
sudo mkdir -p /_build/libraries /_build/programs /mnt/_build/tests
sudo chmod a+rwx /_build/libraries /_build/programs /mnt/_build/tests
Expand Down Expand Up @@ -107,7 +110,6 @@ jobs:
with:
path: |
ccache
sonar_cache
key: sonar-${{ env.OS_VERSION }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
sonar-${{ env.OS_VERSION }}-${{ github.ref }}-
Expand All @@ -117,7 +119,7 @@ jobs:
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
df -h
programs/build_helpers/make_with_sonar bw-output -j 1 -C _build \
programs/build_helpers/make_with_sonar bw-output -j 2 -C _build \
witness_node cli_wallet js_operation_serializer get_dev_key network_mapper \
app_test chain_test cli_test es_test
df -h
Expand Down Expand Up @@ -162,14 +164,12 @@ jobs:
rm -rf _build/programs/genesis_util/get_dev_key
df -h
- name: Unit-Tests
timeout-minutes: 15
run: |
_build/tests/app_test -l test_suite
df -h
echo "Cleanup"
rm -rf /tmp/graphene*
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
echo
_build/tests/es_test -l test_suite
df -h
echo "Cleanup"
Expand All @@ -185,24 +185,14 @@ jobs:
df -h
- name: Prepare for scanning with SonarScanner
run: |
mkdir -p sonar_cache
find _build/libraries/[acdenptuw]*/CMakeFiles/*.dir \
_build/libraries/plugins/*/CMakeFiles/*.dir \
-type d -print \
| while read d; do \
tmpd="${d:7}"; \
srcd="${tmpd/CMakeFiles*.dir/.}"; \
gcov -o "$d" "${srcd}"/*.[ch][px][px] \
"${srcd}"/include/graphene/*/*.[ch][px][px] ; \
done >/dev/null
find _build/programs/[cdgjsw]*/CMakeFiles/*.dir \
-type d -print \
| while read d; do \
tmpd="${d:7}"; \
srcd="${tmpd/CMakeFiles*.dir/.}"; \
gcov -o "$d" "${srcd}"/*.[ch][px][px] ; \
done >/dev/null
programs/build_helpers/set_sonar_branch_for_github_actions sonar-project.properties
pushd _build
gcovr --version
gcovr --exclude-unreachable-branches --exclude-throw-branches \
--exclude '\.\./programs/' \
--exclude '\.\./tests/' \
--sonarqube ../coverage.xml -r ..
popd
- name: Scan with SonarScanner
env:
# to get access to secrets.SONAR_TOKEN, provide GITHUB_TOKEN
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015-2022 Cryptonomex Inc. <[email protected]> and
Copyright (c) 2015-2023 Cryptonomex Inc. <[email protected]> and
contributors (see CONTRIBUTORS.txt)

The MIT License
Expand Down
7 changes: 2 additions & 5 deletions docker/default_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,10 @@ max-ops-per-account = 100
# ==============================================================================

# Track market history by grouping orders into buckets of equal size measured in seconds specified as a JSON array of numbers
# bucket-size = [15,60,300,3600,86400]
bucket-size = [60,300,900,1800,3600,14400,86400]
# for 1 min, 5 mins, 30 mins, 1h, 4 hs and 1 day. i think this should be the default.
# https://github.com/bitshares/bitshares-core/issues/465
bucket-size = [60,300,900,3600,14400,86400,604800]

# How far back in time to track history for each bucket size, measured in the number of buckets (default: 1000)
history-per-size = 1000
history-per-size = 1500

# Will only store this amount of matched orders for each market in order history for querying, or those meet the other option, which has more data (default: 1000)
max-order-his-records-per-market = 1000
Expand Down
16 changes: 7 additions & 9 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,21 +59,19 @@ namespace graphene { namespace app {
return uint32_t(1); // Note: hard code it here for backward compatibility

FC_ASSERT( o_user.valid() && o_password.valid(), "Must provide both user and password" );
string user = *o_user;

optional< api_access_info > acc = _app.get_api_access_info( user );
if( !acc.valid() )
optional< api_access_info > acc = _app.get_api_access_info( *o_user );
if( !acc )
return logout();
if( acc->password_hash_b64 != "*" )
{
std::string password_salt = fc::base64_decode( acc->password_salt_b64 );
std::string acc_password_hash = fc::base64_decode( acc->password_hash_b64 );

string password = *o_password;
fc::sha256 hash_obj = fc::sha256::hash( password + password_salt );
if( hash_obj.data_size() != acc_password_hash.length() )
if( fc::sha256::data_size() != acc_password_hash.length() )
return logout();
if( memcmp( hash_obj.data(), acc_password_hash.c_str(), hash_obj.data_size() ) != 0 )

std::string password_salt = fc::base64_decode( acc->password_salt_b64 );
fc::sha256 hash_obj = fc::sha256::hash( *o_password + password_salt );
if( memcmp( hash_obj.data(), acc_password_hash.data(), fc::sha256::data_size() ) != 0 )
return logout();
}

Expand Down
Loading