Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7466 from EOSIO/merge-release-1.7.4-to-master
Browse files Browse the repository at this point in the history
Merge release 1.7.4 to master
  • Loading branch information
arhag committed Jun 4, 2019
2 parents 448287d + 784939c commit 5082391
Show file tree
Hide file tree
Showing 18 changed files with 136 additions and 819 deletions.
667 changes: 0 additions & 667 deletions .buildkite/pipeline.yml

This file was deleted.

1 change: 0 additions & 1 deletion .pipelinebranch

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Expand Up @@ -31,7 +31,7 @@ set( CXX_STANDARD_REQUIRED ON)

set(VERSION_MAJOR 1)
set(VERSION_MINOR 7)
set(VERSION_PATCH 3)
set(VERSION_PATCH 4)

if(VERSION_SUFFIX)
set(VERSION_FULL "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}-${VERSION_SUFFIX}")
Expand Down
32 changes: 16 additions & 16 deletions CMakeModules/EosioTester.cmake.in
Expand Up @@ -44,28 +44,28 @@ find_package(Boost 1.67 REQUIRED COMPONENTS
iostreams
unit_test_framework)

find_library(libtester eosio_testing @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libchain eosio_chain @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libtester eosio_testing @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libchain eosio_chain @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
if ( "${CMAKE_BUILD_TYPE}" STREQUAL "Debug" )
find_library(libfc fc_debug @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libsecp256k1 secp256k1_debug @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libfc fc_debug @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libsecp256k1 secp256k1_debug @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
else()
find_library(libfc fc @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libsecp256k1 secp256k1 @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libfc fc @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libsecp256k1 secp256k1 @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
endif()

find_library(libwasm WASM @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libwast WAST @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libwabt wabt @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libir IR @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libplatform Platform @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(liblogging Logging @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libruntime Runtime @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libsoftfloat softfloat @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libwasm WASM @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libwast WAST @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libwabt wabt @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libir IR @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libplatform Platform @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(liblogging Logging @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libruntime Runtime @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libsoftfloat softfloat @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(liboscrypto crypto @OPENSSL_ROOT_DIR@/lib)
find_library(libosssl ssl @OPENSSL_ROOT_DIR@/lib)
find_library(libchainbase chainbase @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libbuiltins builtins @CMAKE_INSTALL_FULL_LIBDIR@)
find_library(libchainbase chainbase @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(libbuiltins builtins @CMAKE_INSTALL_PREFIX@/lib64 @CMAKE_INSTALL_PREFIX@/lib)
find_library(GMP_LIBRARIES NAMES libgmp.a gmp.lib gmp libgmp-10 mpir
HINTS ENV GMP_LIB_DIR
ENV GMP_DIR
Expand Down
4 changes: 2 additions & 2 deletions Docker/README.md
Expand Up @@ -20,10 +20,10 @@ cd eos/Docker
docker build . -t eosio/eos
```

The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.7.3 tag, you could do the following:
The above will build off the most recent commit to the master branch by default. If you would like to target a specific branch/tag, you may use a build argument. For example, if you wished to generate a docker image based off of the v1.7.4 tag, you could do the following:

```bash
docker build -t eosio/eos:v1.7.3 --build-arg branch=v1.7.3 .
docker build -t eosio/eos:v1.7.4 --build-arg branch=v1.7.4 .
```

By default, the symbol in eosio.system is set to SYS. You can override this using the symbol argument while building the docker image.
Expand Down
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -39,31 +39,31 @@ $ brew remove eosio
```
#### Ubuntu 18.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.7.3/eosio_1.7.3-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.7.3-1-ubuntu-18.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.7.4/eosio_1.7.4-1-ubuntu-18.04_amd64.deb
$ sudo apt install ./eosio_1.7.4-1-ubuntu-18.04_amd64.deb
```
#### Ubuntu 16.04 Debian Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.7.3/eosio_1.7.3-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.7.3-1-ubuntu-16.04_amd64.deb
$ wget https://github.com/eosio/eos/releases/download/v1.7.4/eosio_1.7.4-1-ubuntu-16.04_amd64.deb
$ sudo apt install ./eosio_1.7.4-1-ubuntu-16.04_amd64.deb
```
#### Debian Package Uninstall
```sh
$ sudo apt remove eosio
```
#### Centos RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.7.3/eosio-1.7.3-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.7.3-1.el7.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.7.4/eosio-1.7.4-1.el7.x86_64.rpm
$ sudo yum install ./eosio-1.7.4-1.el7.x86_64.rpm
```
#### Centos RPM Package Uninstall
```sh
$ sudo yum remove eosio
```
#### Fedora RPM Package Install
```sh
$ wget https://github.com/eosio/eos/releases/download/v1.7.3/eosio-1.7.3-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.7.3-1.fc27.x86_64.rpm
$ wget https://github.com/eosio/eos/releases/download/v1.7.4/eosio-1.7.4-1.fc27.x86_64.rpm
$ sudo yum install ./eosio-1.7.4-1.fc27.x86_64.rpm
```
#### Fedora RPM Package Uninstall
```sh
Expand Down
3 changes: 2 additions & 1 deletion libraries/chain/transaction_context.cpp
Expand Up @@ -124,7 +124,8 @@ namespace bacc = boost::accumulators;
else {
struct itimerval enable = {{0, 0}, {0, (int)x.count()-deadline_timer_verification.timer_overhead}};
expired = 0;
expired |= !!setitimer(ITIMER_REAL, &enable, NULL);
if(setitimer(ITIMER_REAL, &enable, NULL))
expired = 1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion libraries/fc
14 changes: 14 additions & 0 deletions pipeline.jsonc
@@ -0,0 +1,14 @@
{
"eosio-lrt":
{
"pipeline-branch": "legacy-os"
},
"eosio-nightly-builds":
{
"pipeline-branch": "legacy-os"
},
"eosio-base-images":
{
"pipeline-branch": "release/1.7.x"
}
}
2 changes: 1 addition & 1 deletion plugins/producer_plugin/producer_plugin.cpp
Expand Up @@ -1214,7 +1214,7 @@ producer_plugin_impl::start_block_result producer_plugin_impl::start_block() {

if( preprocess_deadline <= fc::time_point::now() ) exhausted = true;
if( exhausted ) break;
const auto& trx = itr->second;
const transaction_metadata_ptr trx = itr->second;
auto category = calculate_transaction_category(trx);
if (category == tx_category::EXPIRED ||
(category == tx_category::UNEXPIRED_UNPERSISTED && _producers.empty()))
Expand Down
4 changes: 2 additions & 2 deletions programs/cleos/main.cpp
Expand Up @@ -1706,8 +1706,8 @@ struct unstaketorex_subcommand {
auto unstaketorex = actionRoot->add_subcommand("unstaketorex", localized("Buy REX using staked tokens"));
unstaketorex->add_option("owner", owner_str, localized("Account buying REX tokens"))->required();
unstaketorex->add_option("receiver", receiver_str, localized("Account that tokens have been staked to"))->required();
unstaketorex->add_option("from_net", from_net_str, localized("Amount to be unstaked from CPU resources and used in REX purchase"))->required();
unstaketorex->add_option("from_cpu", from_cpu_str, localized("Amount to be unstaked from Net resources and used in REX purchase"))->required();
unstaketorex->add_option("from_net", from_net_str, localized("Amount to be unstaked from Net resources and used in REX purchase"))->required();
unstaketorex->add_option("from_cpu", from_cpu_str, localized("Amount to be unstaked from CPU resources and used in REX purchase"))->required();
add_standard_transaction_options(unstaketorex, "owner@active");
unstaketorex->set_callback([this] {
fc::variant act_payload = fc::mutable_variant_object()
Expand Down
38 changes: 0 additions & 38 deletions scripts/parallel-test.sh

This file was deleted.

36 changes: 0 additions & 36 deletions scripts/serial-test.sh

This file was deleted.

41 changes: 0 additions & 41 deletions scripts/submodule_check.sh

This file was deleted.

2 changes: 2 additions & 0 deletions tests/CMakeLists.txt
Expand Up @@ -43,6 +43,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_voting_test.py ${CMAKE_CURRENT
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/consensus-validation-malicious-producers.py ${CMAKE_CURRENT_BINARY_DIR}/consensus-validation-malicious-producers.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/validate-dirty-db.py ${CMAKE_CURRENT_BINARY_DIR}/validate-dirty-db.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/launcher_test.py ${CMAKE_CURRENT_BINARY_DIR}/launcher_test.py COPYONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version-label.sh ${CMAKE_CURRENT_BINARY_DIR}/version-label.sh COPYONLY)

#To run plugin_test with all log from blockchain displayed, put --verbose after --, i.e. plugin_test -- --verbose
add_test(NAME plugin_test COMMAND plugin_test --report_level=detailed --color_output)
Expand Down Expand Up @@ -78,6 +79,7 @@ add_test(NAME validate_dirty_db_test COMMAND tests/validate-dirty-db.py -v --cle
set_property(TEST validate_dirty_db_test PROPERTY LABELS nonparallelizable_tests)
add_test(NAME launcher_test COMMAND tests/launcher_test.py -v --clean-run --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
set_property(TEST launcher_test PROPERTY LABELS nonparallelizable_tests)
add_test(NAME version-label-test COMMAND tests/version-label.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR})

# Long running tests
add_test(NAME nodeos_sanity_lr_test COMMAND tests/nodeos_run_test.py -v --sanity-test --clean-run --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
Expand Down
12 changes: 9 additions & 3 deletions tests/testUtils.py
@@ -1,3 +1,4 @@
import re
import errno
import subprocess
import time
Expand Down Expand Up @@ -219,12 +220,17 @@ def arePortsAvailable(ports):

@staticmethod
def pgrepCmd(serverName):
pgrepOpts="-fl"
# pylint: disable=deprecated-method
if platform.linux_distribution()[0] in ["Ubuntu", "LinuxMint", "Fedora","CentOS Linux","arch"]:
# pgrep differs on different platform (amazonlinux1 and 2 for example). We need to check if pgrep -h has -a available and add that if so:
try:
pgrepHelp = re.search('-a', subprocess.Popen("pgrep --help 2>/dev/null", shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8'))
pgrepHelp.group(0) # group() errors if -a is not found, so we don't need to do anything else special here.
pgrepOpts="-a"
except AttributeError as error:
# If no -a, AttributeError: 'NoneType' object has no attribute 'group'
pgrepOpts="-fl"

return "pgrep %s %s" % (pgrepOpts, serverName)
return "pgrep %s %s" % (pgrepOpts, serverName)\

@staticmethod
def getBlockLog(blockLogLocation, silentErrors=False, exitOnError=False):
Expand Down
73 changes: 73 additions & 0 deletions tests/version-label.sh
@@ -0,0 +1,73 @@
#!/bin/bash
# The purpose of this test is to ensure that the output of the "nodeos --version" command matches the version string defined by our CMake files
# If the environment variable BUILDKITE_TAG is empty or unset, this test will echo success
echo '##### Nodeos Version Label Test #####'
if [[ "$BUILDKITE_TAG" == '' || "$BUILDKITE" != 'true' ]]; then
echo 'This test is only run in Buildkite against tagged builds.'
[[ "$BUILDKITE" != 'true' ]] && echo 'This is not Buildkite.'
[[ "$BUILDKITE_TAG" == '' ]] && echo 'This is not a tagged build.'
echo 'Exiting...'
exit 0
fi
echo 'Tagged build detected, running test.'
# orient ourselves
[[ "$EOSIO_ROOT" == '' ]] && EOSIO_ROOT=$(echo $(pwd)/ | grep -ioe '.*/eos/')
[[ "$EOSIO_ROOT" == '' ]] && EOSIO_ROOT=$(echo $(pwd)/ | grep -ioe '.*/EOSIO/eosio/')
[[ "$EOSIO_ROOT" == '' ]] && EOSIO_ROOT=$(echo $(pwd)/ | grep -ioe '.*/build/' | sed 's,/build/,,')
echo "Using EOSIO_ROOT=\"$EOSIO_ROOT\"."
# determine expected value
CMAKE_CACHE="$EOSIO_ROOT/build/CMakeCache.txt"
CMAKE_LISTS="$EOSIO_ROOT/CMakeLists.txt"
if [[ -f "$CMAKE_CACHE" && $(cat "$CMAKE_CACHE" | grep -c 'DOXY_EOS_VERSION') > 0 ]]; then
echo "Parsing \"$CMAKE_CACHE\"..."
EXPECTED="v$(cat "$CMAKE_CACHE" | grep 'DOXY_EOS_VERSION' | cut -d '=' -f 2)"
elif [[ -f "$CMAKE_LISTS" ]]; then
echo "Parsing \"$CMAKE_LISTS\"..."
export $(cat $CMAKE_LISTS | grep -ie 'set *( *VERSION_MAJOR' | cut -d '(' -f 2 | cut -d ')' -f 1 | awk '{print $1"="$2}')
export $(cat $CMAKE_LISTS | grep -ie 'set *( *VERSION_MINOR' | cut -d '(' -f 2 | cut -d ')' -f 1 | awk '{print $1"="$2}')
export $(cat $CMAKE_LISTS | grep -ie 'set *( *VERSION_PATCH' | cut -d '(' -f 2 | cut -d ')' -f 1 | awk '{print $1"="$2}')
if [[ $(cat $CMAKE_LISTS | grep -ice 'set *( *VERSION_SUFFIX') > 0 ]]; then
echo 'Using version suffix...'
export $(cat $CMAKE_LISTS | grep -ie 'set *( *VERSION_SUFFIX' | cut -d '(' -f 2 | cut -d ')' -f 1 | awk '{print $1"="$2}')
export $(echo "$(cat $CMAKE_LISTS | grep -ie 'set *( *VERSION_FULL.*VERSION_SUFFIX' | cut -d '(' -f 2 | cut -d ')' -f 1 | awk '{print $1"="$2}')" | sed "s/VERSION_MAJOR/$VERSION_MAJOR/" | sed "s/VERSION_MINOR/$VERSION_MINOR/" | sed "s/VERSION_PATCH/$VERSION_PATCH/" | sed "s/VERSION_SUFFIX/$VERSION_SUFFIX/" | tr -d '"{}$')
else
echo 'No version suffix found.'
export $(echo "$(cat $CMAKE_LISTS | grep -ie 'set *( *VERSION_FULL' | grep -ive 'VERSION_SUFFIX' | cut -d '(' -f 2 | cut -d ')' -f 1 | awk '{print $1"="$2}')" | sed "s/VERSION_MAJOR/$VERSION_MAJOR/" | sed "s/VERSION_MINOR/$VERSION_MINOR/" | sed "s/VERSION_PATCH/$VERSION_PATCH/" | tr -d '"{}$')
fi
EXPECTED="v$VERSION_FULL"
fi
# fail if no expected value was found
if [[ "$EXPECTED" == '' ]]; then
echo 'ERROR: Could not determine expected value for version label!'
set +e
echo "EOSIO_ROOT=\"$EOSIO_ROOT\""
echo "CMAKE_CACHE=\"$CMAKE_CACHE\""
echo "CMAKE_LISTS=\"$CMAKE_LISTS\""
echo ''
echo "VERSION_MAJOR=\"$VERSION_MAJOR\""
echo "VERSION_MINOR=\"$VERSION_MINOR\""
echo "VERSION_PATCH=\"$VERSION_PATCH\""
echo "VERSION_SUFFIX=\"$VERSION_SUFFIX\""
echo "VERSION_FULL=\"$VERSION_FULL\""
echo ''
echo '$ cat "$CMAKE_CACHE" | grep "DOXY_EOS_VERSION"'
cat "$CMAKE_CACHE" | grep "DOXY_EOS_VERSION"
echo '$ pwd'
pwd
echo '$ ls -la "$EOSIO_ROOT"'
ls -la "$EOSIO_ROOT"
echo '$ ls -la "$EOSIO_ROOT/build"'
ls -la "$EOSIO_ROOT/build"
exit 1
fi
echo "Expecting \"$EXPECTED\"..."
# get nodeos version
ACTUAL=$($EOSIO_ROOT/build/bin/nodeos --version) || : # nodeos currently returns -1 for --version
# test
if [[ "$EXPECTED" == "$ACTUAL" ]]; then
echo 'Passed with \"$ACTUAL\".'
exit 0
fi
echo 'Failed!'
echo "\"$EXPECTED\" != \"$ACTUAL\""
exit 1

0 comments on commit 5082391

Please sign in to comment.