Skip to content

Commit 17422e4

Browse files
authored
Merge pull request #2550 from bitshares/release_to_develop
Merge release branch back into develop branch
2 parents 970da63 + 9c443bd commit 17422e4

File tree

141 files changed

+21541
-2799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+21541
-2799
lines changed

.github/dependabot.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
target-branch: "develop"

.github/workflows/build-and-test.mac.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Build and test in macOS
99
strategy:
1010
matrix:
11-
os: [macos-10.15, macos-11.0]
11+
os: [macos-10.15, macos-11]
1212
runs-on: ${{ matrix.os }}
1313
steps:
1414
- name: Install dependencies
@@ -28,7 +28,7 @@ jobs:
2828
-D CMAKE_C_COMPILER_LAUNCHER=ccache \
2929
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \
3030
-D BOOST_ROOT=/usr/local/opt/[email protected] \
31-
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl \
31+
-D OPENSSL_ROOT_DIR=/usr/local/opt/openssl@1.1 \
3232
..
3333
- name: Load Cache
3434
uses: actions/cache@v2

.github/workflows/build-and-test.ubuntu-debug.yml

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Build and test in Debug mode
99
strategy:
1010
matrix:
11-
os: [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04 ]
11+
os: [ ubuntu-18.04, ubuntu-20.04 ]
1212
runs-on: ${{ matrix.os }}
1313
services:
1414
elasticsearch:
@@ -85,6 +85,8 @@ jobs:
8585
df -h
8686
make -j 2 -C _build chain_test
8787
make -j 2 -C _build cli_test
88+
make -j 2 -C _build app_test
89+
make -j 2 -C _build es_test
8890
make -j 2 -C _build cli_wallet
8991
make -j 2 -C _build witness_node
9092
make -j 2 -C _build
@@ -96,14 +98,19 @@ jobs:
9698
run: |
9799
_build/tests/app_test -l test_suite
98100
df -h
101+
rm -rf /tmp/graphene*
99102
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \
100103
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
101104
echo
102105
_build/tests/es_test -l test_suite
103106
df -h
107+
rm -rf /tmp/graphene*
104108
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l test_suite
109+
df -h
110+
rm -rf /tmp/graphene*
105111
_build/tests/cli_test -l test_suite
106112
df -h
113+
rm -rf /tmp/graphene*
107114
- name: Quick test for program arguments
108115
run: |
109116
_build/programs/witness_node/witness_node --version

.github/workflows/build-and-test.ubuntu-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
name: Build and test in Release mode
99
strategy:
1010
matrix:
11-
os: [ ubuntu-16.04, ubuntu-18.04, ubuntu-20.04 ]
11+
os: [ ubuntu-18.04, ubuntu-20.04 ]
1212
runs-on: ${{ matrix.os }}
1313
services:
1414
elasticsearch:

.github/workflows/build-and-test.win.yml

+13-8
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@ jobs:
1414
name: Build required 3rd-party libraries
1515
runs-on: ubuntu-latest
1616
steps:
17+
# Get OS version to be used in cache key - see https://github.com/actions/cache/issues/543
18+
- run: |
19+
echo "OS_VERSION=`lsb_release -sr`" >> $GITHUB_ENV
1720
- name: Load Cache
1821
id: cache-libs
19-
uses: actions/cache@v1
22+
uses: actions/cache@v2
2023
with:
2124
path: libs
22-
key: mingw64-libs-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
25+
key: mingw64-libs-${{ env.OS_VERSION }}-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
2326
- name: Install dependencies
2427
if: steps.cache-libs.outputs.cache-hit != 'true'
2528
run: |
@@ -113,11 +116,13 @@ jobs:
113116
- uses: actions/checkout@v2
114117
with:
115118
submodules: recursive
119+
- run: |
120+
echo "OS_VERSION=`lsb_release -sr`" >> $GITHUB_ENV
116121
- name: Load external libraries
117-
uses: actions/cache@v1
122+
uses: actions/cache@v2
118123
with:
119124
path: libs
120-
key: mingw64-libs-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
125+
key: mingw64-libs-${{ env.OS_VERSION }}-${{ env.BOOST_VERSION }}_${{ env.CURL_VERSION }}_${{ env.OPENSSL_VERSION }}_${{ env.ZLIB_VERSION }}
121126
- name: Configure
122127
run: |
123128
LIBS="`pwd`/libs"
@@ -138,13 +143,13 @@ jobs:
138143
-D GRAPHENE_DISABLE_UNITY_BUILD=ON \
139144
..
140145
- name: Load Cache
141-
uses: actions/cache@v1
146+
uses: actions/cache@v2
142147
with:
143148
path: ccache
144-
key: ccache-mingw64-${{ github.ref }}-${{ github.sha }}
149+
key: ccache-mingw64-${{ env.OS_VERSION }}-${{ github.ref }}-${{ github.sha }}
145150
restore-keys: |
146-
ccache-mingw64-${{ github.ref }}-
147-
ccache-mingw64-
151+
ccache-mingw64-${{ env.OS_VERSION }}-${{ github.ref }}-
152+
ccache-mingw64-${{ env.OS_VERSION }}-
148153
- name: Build
149154
run: |
150155
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache"

.github/workflows/build-docker.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and push to DockerHub
2+
on: [ push, pull_request ]
3+
jobs:
4+
docker:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- name: Inject slug/short environment variables
8+
uses: rlespinasse/[email protected]
9+
- name: Decide whether to push to DockerHub, and set tag
10+
if: |
11+
github.event_name == 'push' &&
12+
( startsWith( github.ref, 'refs/tags/' ) ||
13+
contains( fromJSON('["master","develop","testnet","hardfork"]'), env.GITHUB_REF_NAME ) )
14+
run: |
15+
if [[ "${GITHUB_REF_NAME}" == "master" ]] ; then
16+
DOCKER_PUSH_TAG=latest
17+
else
18+
DOCKER_PUSH_TAG=${GITHUB_REF_NAME}
19+
fi
20+
echo "DOCKER_PUSH_TAG=${DOCKER_PUSH_TAG}"
21+
echo "DOCKER_PUSH_TAG=${DOCKER_PUSH_TAG}" >> $GITHUB_ENV
22+
- name: Test tag
23+
if: env.DOCKER_PUSH_TAG != ''
24+
run: echo "${DOCKER_PUSH_TAG}"
25+
- name: Checkout
26+
uses: actions/checkout@v2
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v1
29+
- name: Build only
30+
uses: docker/build-push-action@v2
31+
with:
32+
context: .
33+
load: true
34+
- name: Login to DockerHub
35+
if: env.DOCKER_PUSH_TAG != ''
36+
uses: docker/login-action@v1
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
- name: Push to DockerHub
41+
if: env.DOCKER_PUSH_TAG != ''
42+
uses: docker/build-push-action@v2
43+
with:
44+
context: .
45+
push: true
46+
tags: bitshares/bitshares-core:${{ env.DOCKER_PUSH_TAG }}

.github/workflows/sonar-scan.yml

+41-15
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,6 @@ jobs:
117117
du -hs _build/libraries/* _build/programs/* _build/tests/*
118118
du -hs _build/*
119119
du -hs /_build/*
120-
- name: Unit-Tests
121-
run: |
122-
_build/tests/app_test -l test_suite
123-
df -h
124-
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \
125-
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
126-
echo
127-
_build/tests/es_test -l test_suite
128-
df -h
129-
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l test_suite
130-
_build/tests/cli_test -l test_suite
131-
df -h
132-
echo "Cleanup"
133-
rm -rf /tmp/graphene*
134-
df -h
135120
- name: Quick test for program arguments
136121
run: |
137122
_build/programs/witness_node/witness_node --version
@@ -159,6 +144,38 @@ jobs:
159144
else \
160145
echo "Pass: got expected error."; \
161146
fi
147+
- name: Remove binaries that we no longer need
148+
run: |
149+
df -h
150+
echo "Cleanup"
151+
rm -rf _build/programs/witness_node/witness_node
152+
rm -rf _build/programs/cli_wallet/cli_wallet
153+
rm -rf _build/programs/network_mapper/network_mapper
154+
rm -rf _build/programs/js_operation_serializer/js_operation_serializer
155+
rm -rf _build/programs/genesis_util/get_dev_key
156+
df -h
157+
- name: Unit-Tests
158+
run: |
159+
_build/tests/app_test -l test_suite
160+
df -h
161+
echo "Cleanup"
162+
rm -rf /tmp/graphene*
163+
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \
164+
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }'
165+
echo
166+
_build/tests/es_test -l test_suite
167+
df -h
168+
echo "Cleanup"
169+
rm -rf /tmp/graphene*
170+
libraries/fc/tests/run-parallel-tests.sh _build/tests/chain_test -l test_suite
171+
df -h
172+
echo "Cleanup"
173+
rm -rf /tmp/graphene*
174+
_build/tests/cli_test -l test_suite
175+
df -h
176+
echo "Cleanup"
177+
rm -rf /tmp/graphene*
178+
df -h
162179
- name: Prepare for scanning with SonarScanner
163180
run: |
164181
mkdir -p sonar_cache
@@ -186,3 +203,12 @@ jobs:
186203
run: |
187204
sonar-scanner \
188205
-Dsonar.login=${{ secrets.SONAR_TOKEN }}
206+
- name: Cleanup
207+
run: |
208+
df -h
209+
echo "Final cleanup"
210+
rm -rf _build/tests/app_test
211+
rm -rf _build/tests/chain_test
212+
rm -rf _build/tests/cli_test
213+
rm -rf _build/tests/es_test
214+
df -h

CONTRIBUTORS.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Anzhy Cherrnyavski <[email protected]>
4444
Tengfei Niu <[email protected]>
4545
Tiago Peralta <[email protected]>
4646
47+
4748
Karl Semich <[email protected]>
4849
SahkanDesertHawk <[email protected]>
4950
Scott Howard <[email protected]>
@@ -55,7 +56,6 @@ d.yakovitsky <[email protected]>
5556
ddylko <ddylko@ddylkoPC>
5657
iHashFury <[email protected]>
5758
58-
5959
xuquan316 <[email protected]>
6060
Bartek Wrona <[email protected]>
6161

Doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "BitShares-Core"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "5.2.1"
41+
PROJECT_NUMBER = "6.0.0"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ The `cli_wallet` program can also be configured to serve **all of its commands**
242242

243243
Start `cli_wallet` with RPC connection enabled:
244244

245-
$ ./programs/cli_wallet/cli_wallet --rpc-endpoint=127.0.0.8091
245+
$ ./programs/cli_wallet/cli_wallet --rpc-endpoint=127.0.0.1:8091
246246

247247
Access the wallet API using an HTTP client:
248248

docs

Submodule docs updated from aa76617 to 9617330

libraries/app/api.cpp

+12-4
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ namespace graphene { namespace app {
586586
const auto& idx = hist_idx.indices().get<by_pool_op_type_time>();
587587
auto itr = start.valid() ? idx.lower_bound( boost::make_tuple( pool_id, *operation_type, *start ) )
588588
: idx.lower_bound( boost::make_tuple( pool_id, *operation_type ) );
589-
auto itr_stop = stop.valid() ? idx.upper_bound( boost::make_tuple( pool_id, *operation_type, *stop ) )
589+
auto itr_stop = stop.valid() ? idx.lower_bound( boost::make_tuple( pool_id, *operation_type, *stop ) )
590590
: idx.upper_bound( boost::make_tuple( pool_id, *operation_type ) );
591591
while( itr != itr_stop && result.size() < limit )
592592
{
@@ -599,7 +599,7 @@ namespace graphene { namespace app {
599599
const auto& idx = hist_idx.indices().get<by_pool_time>();
600600
auto itr = start.valid() ? idx.lower_bound( boost::make_tuple( pool_id, *start ) )
601601
: idx.lower_bound( pool_id );
602-
auto itr_stop = stop.valid() ? idx.upper_bound( boost::make_tuple( pool_id, *stop ) )
602+
auto itr_stop = stop.valid() ? idx.lower_bound( boost::make_tuple( pool_id, *stop ) )
603603
: idx.upper_bound( pool_id );
604604
while( itr != itr_stop && result.size() < limit )
605605
{
@@ -645,7 +645,11 @@ namespace graphene { namespace app {
645645
const auto& idx_t = hist_idx.indices().get<by_pool_op_type_time>();
646646
auto itr = start.valid() ? idx.lower_bound( boost::make_tuple( pool_id, *operation_type, *start ) )
647647
: idx.lower_bound( boost::make_tuple( pool_id, *operation_type ) );
648-
auto itr_temp = stop.valid() ? idx_t.upper_bound( boost::make_tuple( pool_id, *operation_type, *stop ) )
648+
if( itr == idx.end() || itr->pool != pool_id || itr->op_type != *operation_type ) // empty result
649+
return result;
650+
if( stop.valid() && itr->time <= *stop ) // empty result
651+
return result;
652+
auto itr_temp = stop.valid() ? idx_t.lower_bound( boost::make_tuple( pool_id, *operation_type, *stop ) )
649653
: idx_t.upper_bound( boost::make_tuple( pool_id, *operation_type ) );
650654
auto itr_stop = ( itr_temp == idx_t.end() ? idx.end() : idx.iterator_to( *itr_temp ) );
651655
while( itr != itr_stop && result.size() < limit )
@@ -660,7 +664,11 @@ namespace graphene { namespace app {
660664
const auto& idx_t = hist_idx.indices().get<by_pool_time>();
661665
auto itr = start.valid() ? idx.lower_bound( boost::make_tuple( pool_id, *start ) )
662666
: idx.lower_bound( pool_id );
663-
auto itr_temp = stop.valid() ? idx_t.upper_bound( boost::make_tuple( pool_id, *stop ) )
667+
if( itr == idx.end() || itr->pool != pool_id ) // empty result
668+
return result;
669+
if( stop.valid() && itr->time <= *stop ) // empty result
670+
return result;
671+
auto itr_temp = stop.valid() ? idx_t.lower_bound( boost::make_tuple( pool_id, *stop ) )
664672
: idx_t.upper_bound( pool_id );
665673
auto itr_stop = ( itr_temp == idx_t.end() ? idx.end() : idx.iterator_to( *itr_temp ) );
666674
while( itr != itr_stop && result.size() < limit )

0 commit comments

Comments
 (0)