Skip to content

Commit

Permalink
Merge pull request #2783 from bitshares/release
Browse files Browse the repository at this point in the history
Merge release branch into master branch for 7.0.0 release
  • Loading branch information
abitmore committed Sep 26, 2023
2 parents bd48746 + 5799660 commit c07ea53
Show file tree
Hide file tree
Showing 129 changed files with 8,239 additions and 1,692 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build-and-test.mac.yml
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
55 changes: 32 additions & 23 deletions .github/workflows/build-and-test.ubuntu-debug.yml
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.10.2
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.13
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,20 +65,15 @@ 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
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
Expand All @@ -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
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.10.2
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.13
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
8 changes: 4 additions & 4 deletions .github/workflows/build-and-test.win.yml
Expand Up @@ -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: 7.86.0
OPENSSL_VERSION: 1.1.1s
ZLIB_VERSION: 1.2.13
CURL_VERSION: 8.3.0
OPENSSL_VERSION: 1.1.1w
ZLIB_VERSION: 1.3
jobs:
prepare-mingw64-libs:
name: Build required 3rd-party libraries
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
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
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.10.2
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: 2 additions & 0 deletions CONTRIBUTORS.txt
Expand Up @@ -69,6 +69,7 @@ Jose Marcial Vieira Bisneto <marcial.vieirab@gmail.com>
Jozef Knaperek <jknaperek@gmail.com>
Ken Code <ken@BitShares-Munich.de>
Krzysztof Szumny <krzysztof.szumny@stxnext.pl>
Massimo Paladin <massimo.paladin@gmail.com>
Paul Brossier <piem@piem.org>
Roelandp <dnaleor@gmail.com>
Semen Martynov <semen.martynov@gmail.com>
Expand All @@ -80,5 +81,6 @@ bitcube <root@seed.cubeconnex.com>
hammadsherwani <83015346+hammadsherwani@users.noreply.github.com>
lafona <lafona@protonmail.com>
liondani <liondani@gmx.com>
litepresence <finitestate@tutamail.com>
lososeg <ya.lososeg@gmail.com>
sinetek <pitwuu@gmail.com>
4 changes: 2 additions & 2 deletions Doxyfile
Expand Up @@ -38,13 +38,13 @@ PROJECT_NAME = "BitShares-Core"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = "6.1.0"
PROJECT_NUMBER = "7.0.0"

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
# quick idea about the purpose of the project. Keep the description short.

PROJECT_BRIEF = "BitShares blockchain implementation and command-line interface software"
PROJECT_BRIEF = "BitShares blockchain node software and command-line wallet software"

# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
# in the documentation. The maximum height of the logo should not exceed 55
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,4 +1,4 @@
Copyright (c) 2015-2022 Cryptonomex Inc. <contact@cryptonomex.com> and
Copyright (c) 2015-2023 Cryptonomex Inc. <contact@cryptonomex.com> and
contributors (see CONTRIBUTORS.txt)

The MIT License
Expand Down
7 changes: 2 additions & 5 deletions docker/default_config.ini
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
2 changes: 1 addition & 1 deletion docs
Submodule docs updated from 6f6ea4 to 8ba173
16 changes: 7 additions & 9 deletions libraries/app/api.cpp
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

0 comments on commit c07ea53

Please sign in to comment.