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 to develop #2169

Merged
merged 357 commits into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
357 commits
Select commit Hold shift + click to select a range
2fdc5ba
BSIP 40: Unit test of CAA latest time
MichelSantos Nov 1, 2019
48da405
BSIP 40: Unit test of CAA earliest and latest time
MichelSantos Nov 1, 2019
f65b84d
BSIP 40: Unit test of proposed CAA earliest and latest time
MichelSantos Nov 1, 2019
82aeb80
BSIP 40: Unit test of optional field restriction
MichelSantos Nov 4, 2019
87ae8bf
BSIP 40: Unit test of string field restriction
MichelSantos Nov 4, 2019
f654d64
BSIP 40: Unit test of vector field size restriction
MichelSantos Nov 6, 2019
2314a3b
BSIP 40: Changes for code review
MichelSantos Nov 6, 2019
64919da
BSIP 40: Changes for Travis CI
MichelSantos Nov 7, 2019
dee35ee
Merge pull request #2044 from MichelSantos/bsip40-unit-tests
pmconrad Nov 7, 2019
422b9e4
CLI: Sign transactions with specified keys
MichelSantos Nov 9, 2019
06b08c5
CLI: Wallet-RPC command to sign transactions with specified keys
MichelSantos Nov 9, 2019
bb1cfce
CLI: Wallet-RPC command to sign builder transactions with specified keys
MichelSantos Nov 9, 2019
16e8254
CLI: Unit test of additional signing key when signing a transaction
MichelSantos Nov 11, 2019
089dea9
Fix cli_test fixture cleanup
pmconrad Nov 12, 2019
d855314
CLI: Change cli_test fixture for testing multiple concurrent CLI wallets
MichelSantos Nov 15, 2019
558f887
CLI: Unit test of custom authorization (BSIP 40) usage with transacti…
MichelSantos Nov 15, 2019
927bb3c
CLI: Changes for code review
MichelSantos Nov 16, 2019
70500fd
Merge pull request #2049 from MichelSantos/2048
jmjatlanta Nov 19, 2019
c17fd10
Tests: Delay after app1->shutdown
MichelSantos Nov 23, 2019
6d10576
Externalize some template base functions
pmconrad Nov 23, 2019
5fef814
Exclude virtual ops from custom authorities
pmconrad Nov 24, 2019
8c487ca
CMake fixes
pmconrad Nov 24, 2019
cd8ce92
Removed empty visitor
pmconrad Nov 24, 2019
fd9275a
Moved fee calculation into separate source file
pmconrad Nov 24, 2019
a9bb824
Merge pull request #2064 from bitshares/release332
abitmore Nov 25, 2019
60decaa
Bump fc for size_t fix
pmconrad Nov 26, 2019
e27f48b
Another size_t fix
pmconrad Nov 26, 2019
de7d43f
Merge pull request #2068 from MichelSantos/2067
oxarbitrage Nov 26, 2019
4be4e9d
Bump fc to for-core-4.0.x
pmconrad Nov 26, 2019
d468ba2
Merge pull request #2069 from pmconrad/2065_mingw_build
pmconrad Nov 26, 2019
803e6f4
Merge pull request #2071 from pmconrad/2070_osx_fix
pmconrad Nov 26, 2019
f6d1add
Add missing HTLC objects to total balance computation
pmconrad Nov 29, 2019
8d30b65
Merge pull request #2072 from pmconrad/fix_debug_htlc
pmconrad Nov 30, 2019
fd368da
Removed an obsolete documentation reference
pmconrad Dec 9, 2019
afc3b88
BSIP 40: Test of restricted trading by a key
MichelSantos Dec 9, 2019
dd151c3
BSIP 40: Test of voting by a key
MichelSantos Dec 9, 2019
eed9508
BSIP 40: Test of changing a witness signing key by a key
MichelSantos Dec 9, 2019
0c8829f
Merge pull request #2079 from pmconrad/fix_invalid_ref
pmconrad Dec 10, 2019
398536f
Bump fc for delete_files fix
pmconrad Dec 11, 2019
872840e
BSIP 40: Changes for code review
MichelSantos Dec 11, 2019
56a5743
Merge pull request #2083 from pmconrad/bump_fc
pmconrad Dec 12, 2019
e9bd589
BSIP 40: Alternate test of restricted trading by a key
MichelSantos Dec 12, 2019
3250dc1
Merge pull request #2081 from MichelSantos/bsip40-unit-tests
pmconrad Dec 28, 2019
dd25caf
Merge pull request #2098 from bitshares/release332
abitmore Feb 8, 2020
9b991c3
Revert "BSIP 40: [TEMPORARY] Workaround Travis failures"
abitmore Feb 8, 2020
91f7029
Revert "BSIP 40: Re-enable coverage, but exclude custom authorities c…
abitmore Feb 8, 2020
b2e73bc
Adjust sonar runtime
pmconrad Nov 1, 2019
8060017
Add graphene_chain to build job
pmconrad Nov 1, 2019
ce5f336
More cache-prepping
pmconrad Nov 1, 2019
76aca84
Update required build time of some steps
abitmore Feb 9, 2020
c64ee76
Remove cli_test from step one
abitmore Feb 9, 2020
9ed91ac
Run sonar scanner in two passes
abitmore Feb 9, 2020
9a15f60
Let set_sonar_branch manage sonar.branch.target
abitmore Feb 9, 2020
e2bd8c1
Update comments in build scripts
abitmore Feb 9, 2020
72e97e1
Update required build time of run.sonar.full step
abitmore Feb 9, 2020
aeb4b16
Fail Travis build when sonar scanner fails
abitmore Feb 9, 2020
1577a5c
Show sonar cfamily cache usage in logs
abitmore Feb 9, 2020
4ac70c1
Update docs about sonar scanner
abitmore Feb 9, 2020
ec5a610
Fix Travis build for pull requests
abitmore Feb 9, 2020
1fdf970
Update comment
abitmore Feb 9, 2020
bcd7ee2
Merge pull request #2102 from bitshares/release4-fix-travis
abitmore Feb 9, 2020
96b6edf
Set default docker cfg max-ops-per-account to 100
abitmore Jan 28, 2020
6cc657f
Merge pull request #2091 from bitshares/abitmore-patch-2
abitmore Feb 10, 2020
95fdfcc
Only cat .hf files when generating hardfork.hpp
abitmore Feb 10, 2020
1a2763b
Fix 250M supply issue
abitmore Feb 10, 2020
0ff68ee
Add the missing .hf file
abitmore Feb 10, 2020
3345f4e
Improve p2p reconnection
abitmore Feb 17, 2020
17d2736
replace upper_bound with equal_range in api call
oxarbitrage Feb 17, 2020
ec701b5
fix small typo in comment
oxarbitrage Feb 17, 2020
d1b74eb
change exception to reference
oxarbitrage Feb 17, 2020
5c4f5b0
remove not needed indexes from custom operations
oxarbitrage Feb 17, 2020
6e9b53d
change account name to account name or id in api call
oxarbitrage Feb 17, 2020
e57ab4e
change custom() to custom_operations()
oxarbitrage Feb 17, 2020
3c6e4c8
add after_block option to custom operations plugin
oxarbitrage Feb 17, 2020
84b18cb
change dlog to wlog in custom operations plugin
oxarbitrage Feb 17, 2020
42d422a
fix wrong key and others
oxarbitrage Feb 17, 2020
4f219aa
change default start after block to 45000000
oxarbitrage Feb 17, 2020
95dd31e
Update wording of an err msg about asset creation
abitmore Feb 21, 2020
03760ed
Merge pull request #2109 from bitshares/abitmore-patch-1
abitmore Feb 24, 2020
1dc7871
Bump FC to include the RPC error message change
abitmore Feb 24, 2020
f7f4322
Merge pull request #2107 from bitshares/pr-2105-p2p-reconn-fix
abitmore Feb 24, 2020
002136f
Merge pull request #2111 from bitshares/fc-bump
abitmore Feb 25, 2020
500459a
change plugin option name
oxarbitrage Feb 27, 2020
10ed74e
fix cli test
oxarbitrage Feb 27, 2020
5cee6e5
Merge pull request #2108 from bitshares/4.0_comments
abitmore Feb 28, 2020
68f450b
Show block numbers in account history in CLI
abitmore Mar 1, 2020
1dd4dd1
Merge pull request #2113 from bitshares/cli-history-block-numbers
abitmore Mar 1, 2020
826c8ec
Remove trailing whitespaces
abitmore Mar 24, 2020
133a672
Increase the active ignored request timeout to 6 seconds
Oct 16, 2017
819a1c1
Update comment for active ignored request timeout
Oct 17, 2017
f70dbdb
Add comment about linked issue, remove whitespaces
abitmore Mar 24, 2020
6cd1a4c
Fix typo in comment
abitmore Mar 25, 2020
5de750d
Merge pull request #2119 from bitshares/pr-2015-p2p-timeout
abitmore Mar 25, 2020
dc842c3
Tweak travis config to try to finish in one run
abitmore Mar 28, 2020
cf3a7cb
Update travis jobs title
abitmore Mar 28, 2020
77833cc
Update travis job to try to hit sonar cache
abitmore Mar 29, 2020
c0ac73a
Merge pull request #2124 from bitshares/update-travis
abitmore Mar 30, 2020
70d69f9
Merge pull request #2123 from bitshares/jmj_releas_hardfork
abitmore Mar 30, 2020
d0ed212
Merge pull request #2125 from bitshares/release
abitmore Mar 31, 2020
eba093c
Merge pull request #2104 from bitshares/pr-2103-supply-fix
abitmore Apr 3, 2020
a7f2cd4
Move chain_parameters::validate() to a new file
abitmore Apr 3, 2020
ac17563
Implement BSIP86: share market fees to the network
abitmore Apr 3, 2020
5c100d3
Return total market fees from pay_market_fees()
abitmore Apr 4, 2020
48e9476
Add test cases for bsip 86
abitmore Apr 4, 2020
a29dbcb
Fix test cases
abitmore Apr 4, 2020
398fc32
Merge pull request #1848 from openledger/issue-1774
abitmore Apr 5, 2020
4cb30cd
Merge pull request #1842 from openledger/issue-1780
abitmore Apr 5, 2020
db25fb4
Merge pull request #1870 from openledger/issue-1800
abitmore Apr 5, 2020
4962673
Merge 'hardfork' into old-hardfork-for-issue-1774
abitmore Apr 6, 2020
03cd2d4
Remove unreachable code
abitmore Apr 6, 2020
91aad69
Fix missing param in minimize_required_signatures
abitmore Apr 6, 2020
50b12c1
Add comments for custom auth op fee calculation
abitmore Apr 6, 2020
f1bfdaf
Fix custom_authority_object by_expiration sorting
abitmore Apr 6, 2020
f9432a1
Update custom_authority_update_operation::validate
abitmore Apr 6, 2020
d280d8e
Fix test cases
abitmore Apr 6, 2020
48a5dca
Add custom_authority_delete_operation::validate()
abitmore Apr 6, 2020
b10f592
Add docs for get_custom arg in verify_authority()
abitmore Apr 6, 2020
7cd614a
Update custom_operations/custom_evaluators.cpp
abitmore Apr 6, 2020
f89aa0f
Add a missing nullptr check
abitmore Apr 6, 2020
b915c07
Update authority_tests.cpp
abitmore Apr 6, 2020
b7c3ff9
Re-add owner_delegation_test which was removed
abitmore Apr 6, 2020
bd5371c
Add TODO comment to change some code after hf
abitmore Apr 6, 2020
2535d81
Fix compiler warnings
abitmore Apr 6, 2020
c945dd8
Bump FC to include several changes
abitmore Apr 6, 2020
64fdcdd
Update message wording; do not deposit zero reward
abitmore Apr 6, 2020
8a4e1ca
Fix a compiler warning
abitmore Apr 6, 2020
45aceb1
Merge pull request #2131 from bitshares/old-hardfork-for-issue-1774
abitmore Apr 6, 2020
72d5e75
Do not update accumulated_fees if no change
abitmore Apr 6, 2020
d54d153
Merge pull request #2135 from bitshares/old-hardfork-for-issue-1774
abitmore Apr 7, 2020
2a5b29b
include preimage in operation history
jmjatlanta Apr 7, 2020
4264348
ref wallet - pretty-print htlc redeemed op
jmjatlanta Apr 7, 2020
a2fc464
Merge pull request #2134 from bitshares/pr-fix-4.0
abitmore Apr 8, 2020
23008cd
Merge 'hardfork' branch, apply minor fixes
abitmore Apr 9, 2020
7348873
Fix test cases
abitmore Apr 9, 2020
ab3f9b8
Update coding style
abitmore Apr 9, 2020
c32a4e6
Add market fee sharing for instant settlements
abitmore Apr 9, 2020
140f022
Update test cases
abitmore Apr 9, 2020
88727de
Wrap long lines
abitmore Apr 9, 2020
c54302f
Update comments
abitmore Apr 10, 2020
db5bb12
Merge pull request #2132 from bitshares/way-old-hardfork-for-issue-1780
abitmore Apr 10, 2020
350f177
Merge 'hardfork' branch
abitmore Apr 10, 2020
2ddf047
Fix market fee sharing for temp-account referrer
abitmore Apr 10, 2020
0a3a0a6
Add tests for temp-account referrer fee sharing
abitmore Apr 10, 2020
09970f6
Fee max of 30%
jmjatlanta Apr 10, 2020
53f0a00
Merge pull request #2128 from bitshares/pr-bsip86
abitmore Apr 10, 2020
ad51a8d
Add a missing param in get_required_signatures API
abitmore Apr 10, 2020
f55a5c8
Merge pull request #2138 from bitshares/pr-2087-get-required-sigs-cus…
abitmore Apr 11, 2020
a6bed6b
Update jmj_bsip_64 with hardfork changes
jmjatlanta Apr 11, 2020
a59540f
fixes for wallet operation_printer
jmjatlanta Apr 11, 2020
70cc85f
Merge pull request #2133 from bitshares/old-hardfork-for-issue-1800
abitmore Apr 11, 2020
9975948
bsip64 memo fixes and addl testing
jmjatlanta Apr 15, 2020
7eee72c
fix constexpr warnings
jmjatlanta Apr 15, 2020
f161b38
verify hash appears in history
jmjatlanta Apr 15, 2020
f1a2ab0
add per kb fee for htlc memos
jmjatlanta Apr 15, 2020
0a55c64
bump FC for hash160 changes
jmjatlanta Apr 15, 2020
81666aa
Update by_custom_id to by_id
abitmore Apr 16, 2020
9c7860e
Check api_helper_indexes plugin for several APIs
abitmore Apr 16, 2020
5bd1a59
Enable custom_operations plugin by default
abitmore Apr 16, 2020
c921ffd
Fix test cases
abitmore Apr 16, 2020
e836204
Merge pull request #2142 from bitshares/fix-4.0
abitmore Apr 16, 2020
352b854
Merge pull request #2143 from bitshares/pr-2092-enable-custom-operati…
abitmore Apr 16, 2020
c5c763e
Implement BSIP85 Maker order creation fee discount
abitmore Apr 17, 2020
85f651c
Add a comment
abitmore Apr 17, 2020
43ce6fd
Add test cases for bsip 85
abitmore Apr 17, 2020
2f2ec4d
BSIP81: Define taker fee
MichelSantos Mar 30, 2020
b252cf6
BSIP81: Use maker or taker fee when calculating market fee
MichelSantos Mar 30, 2020
3e49240
Add get_limit_orders_by_account API
abitmore Apr 18, 2020
a60feec
BSIP81: Define hardfork time
MichelSantos Mar 30, 2020
58767d9
BSIP81: Hardfork guards on asset operations
MichelSantos Mar 30, 2020
e9c8f59
BSIP81: Assign default taker fees at hardfork activation time
MichelSantos Mar 30, 2020
ebff7f1
BSIP81: Test the setting of taker fees
MichelSantos Apr 1, 2020
501cb1e
BSIP81: Test default values of taker fees after hardfork activation
MichelSantos Apr 1, 2020
fe590d1
BSIP81: Test taker fees when complete filling of UIA orders
MichelSantos Apr 4, 2020
c7ed43b
BSIP81: Hardfork guards on asset operations in proposals
MichelSantos Apr 9, 2020
36fbf2d
BSIP81: Test taker fees when complete filling of UIA orders
MichelSantos Apr 9, 2020
9d73860
BSIP81: Test taker fees when complete filling of a smart asset order
MichelSantos Apr 9, 2020
9b9ed84
BSIP81: Test maker and taker fees for partially filled limit orders
MichelSantos Apr 10, 2020
bab6d23
BSIP81: Comments
MichelSantos Apr 13, 2020
86a7233
BSIP81: Remove unused public function from evaluator
MichelSantos Apr 13, 2020
8e221be
BSIP81: Fix bug of zero taker fees whenever maker fee is set to 0%
MichelSantos Apr 13, 2020
4f339c6
BSIP81: Refactor taker_fee_percent into asset_options.extensions
MichelSantos Apr 14, 2020
2be77d9
BSIP81: Refactor unit tests to obtain the final asset objects from th…
MichelSantos Apr 14, 2020
759c91a
BSIP81: Comments
MichelSantos Apr 15, 2020
6d750c6
BSIP81: Taker orders should be charged the taker fee if defined, othe…
MichelSantos Apr 15, 2020
3408aac
BSIP81: Merge resolution with Issue 1780
MichelSantos Apr 18, 2020
20e43f0
Adjust fee schedule
jmjatlanta Apr 18, 2020
322113d
Move api-limit related test cases to a new file
abitmore Apr 18, 2020
c851b2a
Fix API docs
abitmore Apr 18, 2020
afcd7d5
Add test cases for get_limit_orders_by_account API
abitmore Apr 18, 2020
911ff45
Fix test cases
abitmore Apr 18, 2020
5f68e64
do htlc hf checks in proposals
jmjatlanta Apr 18, 2020
bbab2f9
add preimage serialization
jmjatlanta Apr 18, 2020
b6bb193
adjust transfer_restricted logic
jmjatlanta Apr 18, 2020
1039366
Exclude memo on locked wallets
jmjatlanta Apr 18, 2020
3629d80
put print_memo in proper scope
jmjatlanta Apr 18, 2020
5a1dc72
Update database APIs related to workers
abitmore Apr 20, 2020
aaf9693
Add test cases for get_all_workers API
abitmore Apr 20, 2020
4e04c1d
Add test cases for get_workers_by_account API
abitmore Apr 20, 2020
133f7c3
truncate long preimages in wallet output
jmjatlanta Apr 20, 2020
3e3df5a
standardize exact hardfork time
jmjatlanta Apr 20, 2020
ec78f4d
Use current (not default) memo fee
jmjatlanta Apr 20, 2020
fc15857
Detect overflow
jmjatlanta Apr 20, 2020
a264f91
Merge pull request #2149 from bitshares/pr-2121-worker-api
abitmore Apr 20, 2020
4d6c20a
Update default config.ini for docker
abitmore Apr 21, 2020
e0fa2c4
Merge pull request #2145 from bitshares/pr-bsip85-maker-fee-discount
abitmore Apr 21, 2020
cf36230
remove decimal from test
jmjatlanta Apr 21, 2020
96112d4
BOOST_TEST_FAIL no longer part of Boost
jmjatlanta Apr 21, 2020
5d25fb4
Merge pull request #2146 from bitshares/pr-account-orders-api
abitmore Apr 22, 2020
f99d81f
BSIP81: Test improvements
MichelSantos Apr 21, 2020
0f712cc
BSIP81: Test default taker fee usage after hardfork if the asset owne…
MichelSantos Apr 21, 2020
f1e0bae
Report the actual API limits in error messages
abitmore Apr 22, 2020
4bda2d9
Merge pull request #2136 from bitshares/bsip81
abitmore Apr 22, 2020
13c0ff6
Fix wallet and tests
abitmore Apr 22, 2020
850079e
Fix cli_test
abitmore Apr 22, 2020
25b96e7
Fix test case for api-limit-lookup-vote-ids
abitmore Apr 22, 2020
79a7abf
fee_helper refactor
jmjatlanta Apr 23, 2020
511c195
Merge pull request #2154 from bitshares/pr-2141-api-limit-message
abitmore Apr 23, 2020
0412a9c
Update comment
abitmore Apr 23, 2020
11f0b8c
Prevent exception if fee does not exist
jmjatlanta Apr 23, 2020
f2d76ad
merge changes from hardfork
jmjatlanta Apr 23, 2020
9f4c786
Merge pull request #2155 from bitshares/update-comment
abitmore Apr 23, 2020
d02fd01
permit restricted transfers in proposals
jmjatlanta Apr 24, 2020
7cfcc52
merge of hf into feature branch
jmjatlanta Apr 24, 2020
e4472a9
Remove test spaghetti + minor fixes
jmjatlanta Apr 27, 2020
0b0d7e9
Merge pull request #2140 from bitshares/jmj_bsip86_30pct
abitmore Apr 27, 2020
d04d913
Add collateral-denominated fees container
christophersanborn Apr 25, 2020
43026a8
Add accumulate_fee() method to asset_object
christophersanborn Apr 25, 2020
985733e
Add ability to claim collateral-denominated fees.
christophersanborn Apr 26, 2020
d116fc8
Check collateral fees empty before changing backing asset.
christophersanborn Apr 27, 2020
f608039
Hardfork protection on asset_claim_fees extension.
christophersanborn Apr 27, 2020
0caf73e
Proposal hardfork guards on asset_claim_fees_operation
christophersanborn Apr 27, 2020
bb8493d
Merge pull request #1998 from bitshares/jmj_bsip_64
abitmore Apr 28, 2020
06b0fe3
Fix line length, store preimage in virt op
jmjatlanta Apr 28, 2020
ccef9fd
Replace BOOST_TEST with BOOST_CHECK
jmjatlanta Apr 28, 2020
ca06127
Merge pull request #2161 from bitshares/jmj_bsip_64_pt2
abitmore Apr 28, 2020
864cf3e
Move seed nodes processing code to network module
jmjatlanta Apr 29, 2020
30648f2
Periodically re-check addresses of seed nodes
abitmore May 1, 2020
8bff266
return lowest_ask and highest_bid order volume
crazybits Apr 28, 2020
22ab82c
formatting updated as advised
crazybits Apr 29, 2020
02f9da8
Changes requested in code review
christophersanborn May 2, 2020
b6785e0
Merge pull request #2159 from christophersanborn/cjs-collat-asset-con…
abitmore May 3, 2020
68eebf1
Merge pull request #2166 from crazybits/hardfork
abitmore May 3, 2020
ecc5cbb
Merge pull request #2164 from bitshares/pr-2153-recheck-seeds
abitmore May 3, 2020
da86d07
Merge 'develop' into merge-hardfork-to-develop
abitmore May 5, 2020
5ea6b81
Merge 'develop' into merge-hardfork-to-develop
abitmore May 5, 2020
8109e3e
Split custom active auth predicate to more files
abitmore May 5, 2020
8521b77
Fix run-node-test
abitmore May 5, 2020
60b4a49
Make use of local disk space for Github Autobuild
abitmore May 5, 2020
582d5b9
Wait longer in two_node_network test case
abitmore May 6, 2020
28b48cb
Wait longer in es_test for debug build
abitmore May 6, 2020
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
31 changes: 29 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
libboost-regex-dev \
libboost-coroutine-dev \
libcurl4-openssl-dev
sudo apt-get auto-remove -y
sudo apt-get clean -y
df -h
- uses: actions/checkout@v1
with:
submodules: recursive
Expand Down Expand Up @@ -64,16 +67,20 @@ jobs:
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
make -j 2 -C _build
df -h
- name: Unit-Tests
run: |
_build/tests/app_test
_build/tests/es_test
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test
_build/tests/es_test
df -h
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test
df -h
test-debug:
name: Build and run tests in Debug mode
runs-on: ubuntu-latest
Expand All @@ -99,12 +106,19 @@ jobs:
libboost-regex-dev \
libboost-coroutine-dev \
libcurl4-openssl-dev
sudo apt-get auto-remove -y
sudo apt-get clean -y
df -h
- uses: actions/checkout@v1
with:
submodules: recursive
- name: Configure
run: |
mkdir -p _build
sudo mkdir -p /mnt/libraries /mnt/tests
sudo chmod a+rwx /mnt/libraries /mnt/tests
ln -s /mnt/libraries _build/libraries
ln -s /mnt/tests _build/tests
pushd _build
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR
cmake -D CMAKE_BUILD_TYPE=Debug \
Expand All @@ -127,17 +141,24 @@ jobs:
run: |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"
mkdir -p "$CCACHE_DIR"
df -h
make -j 2 -C _build
df -h
- name: Unit-Tests
run: |
_build/tests/app_test
df -h
_build/tests/es_test
df -h
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test
_build/tests/es_test
df -h
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test
df -h
prepare-mingw64-libs:
name: Build 3rd-party libraries required for windows cross-build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -233,6 +254,9 @@ jobs:
ccache \
g++-mingw-w64-x86-64 \
mingw-w64-tools
sudo apt-get auto-remove -y
sudo apt-get clean -y
df -h
- uses: actions/checkout@v1
with:
submodules: recursive
Expand Down Expand Up @@ -309,12 +333,15 @@ jobs:
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
df -h
- name: Unit-Tests
run: |
_build/tests/app_test
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test
libraries/fc/tests/run-parallel-tests.sh _build/tests/cli_test
df -h
- name: Node-Test
run: |
df -h
pushd _build
../programs/build_helpers/run-node-test
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,7 @@ jobs:
include:
- stage: build for cache
script: ./programs/build_helpers/build_protocol
- stage: build and test
- stage: build, test and scan partly with sonar
script: ./programs/build_helpers/build_and_test
- stage: scan fully with sonar
script: ./programs/build_helpers/scan_with_sonar
7 changes: 5 additions & 2 deletions docker/default_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ rpc-endpoint = 0.0.0.0:8090
# For database_api_impl::get_limit_orders to set max limit value
# api-limit-get-limit-orders = 300

# For database_api_impl::get_limit_orders_by_account to set max limit value
# api-limit-get-limit-orders-by-account = 101

# For database_api_impl::get_order_book to set max limit value
# api-limit-get-order-book = 50

Expand Down Expand Up @@ -119,7 +122,7 @@ rpc-endpoint = 0.0.0.0:8090
# api-limit-get-withdraw-permissions-by-recipient = 101

# Space-separated list of plugins to activate
plugins = witness account_history market_history grouped_orders api_helper_indexes
plugins = witness account_history market_history grouped_orders api_helper_indexes custom_operations

# Do not exit if api_helper_indexes plugin is not enabled.
# ignore-api-helper-indexes-warning = true
Expand Down Expand Up @@ -164,7 +167,7 @@ enable-stale-production = false
partial-operations = true

# Maximum number of operations per account will be kept in memory
max-ops-per-account = 1000
max-ops-per-account = 100


# ==============================================================================
Expand Down
97 changes: 64 additions & 33 deletions libraries/app/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ namespace graphene { namespace app {
return *_debug_api;
}

fc::api<custom_operations_api> login_api::custom() const
fc::api<custom_operations_api> login_api::custom_operations() const
{
FC_ASSERT(_custom_operations_api);
return *_custom_operations_api;
Expand Down Expand Up @@ -342,8 +342,12 @@ namespace graphene { namespace app {
{
FC_ASSERT( _app.chain_database() );
const auto& db = *_app.chain_database();
uint64_t api_limit_get_account_history=_app.get_options().api_limit_get_account_history;
FC_ASSERT( limit <= api_limit_get_account_history );

const auto configured_limit = _app.get_options().api_limit_get_account_history;
FC_ASSERT( limit <= configured_limit,
"limit can not be greater than ${configured_limit}",
("configured_limit", configured_limit) );

vector<operation_history_object> result;
account_id_type account;
try {
Expand Down Expand Up @@ -387,12 +391,16 @@ namespace graphene { namespace app {
int operation_type,
operation_history_id_type start,
operation_history_id_type stop,
unsigned limit) const
unsigned limit ) const
{
FC_ASSERT( _app.chain_database() );
const auto& db = *_app.chain_database();
uint64_t api_limit_get_account_history_operations=_app.get_options().api_limit_get_account_history_operations;
FC_ASSERT(limit <= api_limit_get_account_history_operations);

const auto configured_limit = _app.get_options().api_limit_get_account_history_operations;
FC_ASSERT( limit <= configured_limit,
"limit can not be greater than ${configured_limit}",
("configured_limit", configured_limit) );

vector<operation_history_object> result;
account_id_type account;
try {
Expand Down Expand Up @@ -427,12 +435,16 @@ namespace graphene { namespace app {
vector<operation_history_object> history_api::get_relative_account_history( const std::string account_id_or_name,
uint64_t stop,
unsigned limit,
uint64_t start) const
uint64_t start ) const
{
FC_ASSERT( _app.chain_database() );
const auto& db = *_app.chain_database();
uint64_t api_limit_get_relative_account_history=_app.get_options().api_limit_get_relative_account_history;
FC_ASSERT(limit <= api_limit_get_relative_account_history);

const auto configured_limit = _app.get_options().api_limit_get_relative_account_history;
FC_ASSERT( limit <= configured_limit,
"limit can not be greater than ${configured_limit}",
("configured_limit", configured_limit) );

vector<operation_history_object> result;
account_id_type account;
try {
Expand Down Expand Up @@ -469,24 +481,38 @@ namespace graphene { namespace app {
return hist->tracked_buckets();
}

history_operation_detail history_api::get_account_history_by_operations(const std::string account_id_or_name, vector<uint16_t> operation_types, uint32_t start, unsigned limit)
history_operation_detail history_api::get_account_history_by_operations( const std::string account_id_or_name,
flat_set<uint16_t> operation_types,
uint32_t start, unsigned limit )const
{
uint64_t api_limit_get_account_history_by_operations=_app.get_options().api_limit_get_account_history_by_operations;
FC_ASSERT(limit <= api_limit_get_account_history_by_operations);
const auto configured_limit = _app.get_options().api_limit_get_account_history_by_operations;
FC_ASSERT( limit <= configured_limit,
"limit can not be greater than ${configured_limit}",
("configured_limit", configured_limit) );

history_operation_detail result;
vector<operation_history_object> objs = get_relative_account_history(account_id_or_name, start, limit, limit + start - 1);
std::for_each(objs.begin(), objs.end(), [&](const operation_history_object &o) {
if (operation_types.empty() || find(operation_types.begin(), operation_types.end(), o.op.which()) != operation_types.end()) {
result.operation_history_objs.push_back(o);
}
});
vector<operation_history_object> objs = get_relative_account_history( account_id_or_name, start, limit,
limit + start - 1 );
result.total_count = objs.size();

if( operation_types.empty() )
result.operation_history_objs = std::move(objs);
else
{
for( const operation_history_object &o : objs )
{
if( operation_types.find(o.op.which()) != operation_types.end() ) {
result.operation_history_objs.push_back(o);
}
}
}

result.total_count = objs.size();
return result;
return result;
}

vector<bucket_object> history_api::get_market_history( std::string asset_a, std::string asset_b,
uint32_t bucket_seconds, fc::time_point_sec start, fc::time_point_sec end )const
uint32_t bucket_seconds,
fc::time_point_sec start, fc::time_point_sec end )const
{ try {
FC_ASSERT(_app.chain_database());
const auto& db = *_app.chain_database();
Expand Down Expand Up @@ -577,9 +603,13 @@ namespace graphene { namespace app {
) { }
asset_api::~asset_api() { }

vector<account_asset_balance> asset_api::get_asset_holders( std::string asset, uint32_t start, uint32_t limit ) const {
uint64_t api_limit_get_asset_holders=_app.get_options().api_limit_get_asset_holders;
FC_ASSERT(limit <= api_limit_get_asset_holders);
vector<account_asset_balance> asset_api::get_asset_holders( std::string asset, uint32_t start, uint32_t limit ) const
{
const auto configured_limit = _app.get_options().api_limit_get_asset_holders;
FC_ASSERT( limit <= configured_limit,
"limit can not be greater than ${configured_limit}",
("configured_limit", configured_limit) );

asset_id_type asset_id = database_api.get_asset_id_from_string( asset );
const auto& bal_idx = _db.get_index_type< account_balance_index >().indices().get< by_asset_balance >();
auto range = bal_idx.equal_range( boost::make_tuple( asset_id ) );
Expand Down Expand Up @@ -660,8 +690,11 @@ namespace graphene { namespace app {
optional<price> start,
uint32_t limit )const
{
uint64_t api_limit_get_grouped_limit_orders=_app.get_options().api_limit_get_grouped_limit_orders;
FC_ASSERT( limit <= api_limit_get_grouped_limit_orders );
const auto configured_limit = _app.get_options().api_limit_get_grouped_limit_orders;
FC_ASSERT( limit <= configured_limit,
"limit can not be greater than ${configured_limit}",
("configured_limit", configured_limit) );

auto plugin = _app.get_plugin<graphene::grouped_orders::grouped_orders_plugin>( "grouped_orders" );
FC_ASSERT( plugin );
const auto& limit_groups = plugin->limit_order_groups();
Expand All @@ -676,7 +709,7 @@ namespace graphene { namespace app {
max_price = std::max( std::min( max_price, *start ), min_price );

auto itr = limit_groups.lower_bound( limit_order_group_key( group, max_price ) );
// use an end itrator to try to avoid expensive price comparison
// use an end iterator to try to avoid expensive price comparison
auto end = limit_groups.upper_bound( limit_order_group_key( group, min_price ) );
while( itr != end && result.size() < limit )
{
Expand All @@ -696,12 +729,10 @@ namespace graphene { namespace app {
const auto account_id = database_api.get_account_id_from_string(account_id_or_name);
vector<account_storage_object> results;
const auto& storage_index = _app.chain_database()->get_index_type<account_storage_index>();
const auto& by_account_catalog_idx = storage_index.indices().get<by_account_catalog>();
auto itr = by_account_catalog_idx.lower_bound(make_tuple(account_id, catalog));
while(itr != by_account_catalog_idx.end() && itr->account == account_id && itr->catalog == catalog) {
results.push_back(*itr);
++itr;
}
const auto& by_account_catalog_idx = storage_index.indices().get<by_account_catalog_key>();
auto range = by_account_catalog_idx.equal_range(make_tuple(account_id, catalog));
for( const account_storage_object& aso : boost::make_iterator_range( range.first, range.second ) )
results.push_back(aso);
return results;
}

Expand Down
23 changes: 20 additions & 3 deletions libraries/app/api_objects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ market_ticker::market_ticker(const market_ticker_object& mto,
quote = asset_quote.symbol;
percent_change = "0";
lowest_ask = "0";
lowest_ask_base_size = "0";
lowest_ask_quote_size = "0";
highest_bid = "0";

highest_bid_base_size = "0";
highest_bid_quote_size = "0";
fc::uint128_t bv;
fc::uint128_t qv;
price latest_price = asset( mto.latest_base, mto.base ) / asset( mto.latest_quote, mto.quote );
Expand Down Expand Up @@ -68,9 +71,19 @@ market_ticker::market_ticker(const market_ticker_object& mto,
quote_volume = uint128_amount_to_string( qv, asset_quote.precision );

if(!orders.asks.empty())
lowest_ask = orders.asks[0].price;
{
lowest_ask = orders.asks[0].price;
lowest_ask_base_size = orders.asks[0].base;
lowest_ask_quote_size = orders.asks[0].quote;
}

if(!orders.bids.empty())
highest_bid = orders.bids[0].price;
{
highest_bid = orders.bids[0].price;
highest_bid_base_size = orders.bids[0].base;
highest_bid_quote_size = orders.bids[0].quote;
}

}

market_ticker::market_ticker(const fc::time_point_sec& now,
Expand All @@ -82,7 +95,11 @@ market_ticker::market_ticker(const fc::time_point_sec& now,
quote = asset_quote.symbol;
latest = "0";
lowest_ask = "0";
lowest_ask_base_size = "0";
lowest_ask_quote_size = "0";
highest_bid = "0";
highest_bid_base_size = "0";
highest_bid_quote_size = "0";
percent_change = "0";
base_volume = "0";
quote_volume = "0";
Expand Down
Loading