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

New stable #1504

Merged
merged 54 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
c919af7
Update VERSION
DmytroNazarenko Jan 30, 2023
7ec6bd5
Update publish.yml
DmytroNazarenko Jan 30, 2023
a7db090
Update publish.yml
DmytroNazarenko Jan 30, 2023
e712d90
Update calculate_version.sh
DmytroNazarenko Jan 30, 2023
4df6542
Update publish.yml
DmytroNazarenko Jan 31, 2023
70942e7
Merge pull request #1377 from skalenetwork/enhancement/prepare-milest…
DmytroNazarenko Jan 31, 2023
deb1d31
Merge branch 'v3.17.0' into develop-to-milestone
DmytroNazarenko Feb 28, 2023
7d03f48
Merge pull request #1443 from skalenetwork/develop-to-milestone
DmytroNazarenko Feb 28, 2023
7ce3a89
Update VERSION
DmytroNazarenko Mar 20, 2023
d67e66b
Merge pull request #1463 from skalenetwork/enhancement/create-milesto…
DmytroNazarenko Mar 20, 2023
12a4f41
Instructions for 20.04 in README.md
dimalit Mar 20, 2023
924fc28
Fix cached_filestorage test
DmytroNazarenko Mar 20, 2023
f801512
Merge pull request #1466 from skalenetwork/bug/fix-fs-tests
DmytroNazarenko Mar 20, 2023
a9c1645
Merge branch 'v3.16.1' into enhancement/SKALED-1455-ubuntu20.04
dimalit Mar 20, 2023
011b413
Merge pull request #1464 from skalenetwork/enhancement/SKALED-1455-ub…
kladkogex Mar 21, 2023
1268fc9
SKALED-1455 Add -f option in btrfs command as required
dimalit Mar 21, 2023
cf4f0be
SKALED-1455 Use Ubuntu 20.04 in Dockerfile
dimalit Mar 21, 2023
84e41a6
SKALED-1455 Fix tzdata
dimalit Mar 22, 2023
c00c0c6
SKALED-1455 Use Ubuntu 20.04 in Dockerfile
dimalit Mar 22, 2023
5f6f63c
Merge branch 'v3.16.1' into enhancement/SKALED-1455-btrfs-bug
dimalit Mar 22, 2023
5299dc4
SKALED-1455 Automatically check btrfs-progs version
dimalit Mar 23, 2023
6625516
SKALED-1455 Fix dependencies from btrfs.c in SnapshotManager
dimalit Mar 24, 2023
897c57a
add missing tests to github pipeline
olehnikolaiev Mar 24, 2023
4206237
SKALED-1467 clang-format-11
dimalit Mar 24, 2023
772804e
Merge branch 'v3.16.1' into 1477-reenable-unit-tests-in-skaled
olehnikolaiev Mar 24, 2023
c4cb05e
Merge pull request #1478 from skalenetwork/1477-reenable-unit-tests-i…
DmytroNazarenko Mar 25, 2023
6920591
Merge branch 'v3.16.1' into enhancement/SKALED-1455-btrfs-bug
dimalit Mar 27, 2023
2dbf8e9
SKALED-1467 Once more clang-format-11
dimalit Mar 27, 2023
bc898ae
Merge branch 'v3.16.1' into enhancement/SKALED-1467-clang-format-11
dimalit Mar 27, 2023
f056d4d
SKALED-1455 Add -f option in btrfs command as required
dimalit Mar 27, 2023
2608e52
Merge branch 'v3.16.1' into enhancement/SKALED-1467-clang-format-11
dimalit Mar 27, 2023
b5423ac
SKALED-1467 clang-format-11
dimalit Mar 27, 2023
3fb89cf
709 complete oracle (#1487)
kladkogex Apr 3, 2023
264c5b9
704 update consensus with fix for checkstate
kladkogex Apr 4, 2023
dab33f2
Merge pull request #1490 from skalenetwork/704_update_consensus_with_…
DmytroNazarenko Apr 4, 2023
a36bd51
Merge pull request #1491 from skalenetwork/v3.16.1
DmytroNazarenko Apr 5, 2023
5d8fcc7
Update on_pr.yml
DmytroNazarenko Apr 5, 2023
460a9b5
Merge pull request #1492 from skalenetwork/enhancement/update-on-pr-w…
DmytroNazarenko Apr 5, 2023
19f0c20
Merge branch 'beta' into develop
DmytroNazarenko Apr 5, 2023
95d454e
Merge pull request #1493 from skalenetwork/develop
DmytroNazarenko Apr 5, 2023
76afbcf
754_no_informative_log_output
kladkogex Apr 12, 2023
f867002
754_no_informative_log_output
kladkogex Apr 12, 2023
18fbd6c
754_no_informative_log_output
kladkogex Apr 12, 2023
6432e15
Merge branch 'develop' into 754_no_informative_log_output
kladkogex Apr 13, 2023
6a9c2c6
Merge branch 'develop' into 754_no_informative_log_output
kladkogex Apr 13, 2023
dcf07f5
754_no_informative_log_output
kladkogex Apr 13, 2023
57ead94
754_no_informative_log_output
kladkogex Apr 13, 2023
e83d06c
Merge pull request #1497 from skalenetwork/754_no_informative_log_output
DmytroNazarenko Apr 14, 2023
ba2af14
Merge branch 'beta' into develop
DmytroNazarenko Apr 14, 2023
e200fed
Merge pull request #1500 from skalenetwork/develop
DmytroNazarenko Apr 14, 2023
662fd1d
754_additional_fix
kladkogex Apr 14, 2023
eacef90
Merge pull request #1501 from skalenetwork/754_additional_fix
DmytroNazarenko Apr 14, 2023
1b3d6b8
Merge branch 'beta' into develop
DmytroNazarenko Apr 14, 2023
62e4794
Merge pull request #1502 from skalenetwork/develop
DmytroNazarenko Apr 14, 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
2 changes: 1 addition & 1 deletion .github/workflows/clang-format-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
source: '.'
exclude: './CMakeFiles ./cmake ./deps ./build ./skaled_ssl_test ./newer_lcov'
extensions: 'h,hpp,hxx,cpp,cxx,cc,ipp'
clangFormatVersion: 10
clangFormatVersion: 11
2 changes: 1 addition & 1 deletion .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened]
jobs:
main_job:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
name: Add some useful instructions to PR creator
steps:
- uses: actions/checkout@v1
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ on:
pull_request:
types: [closed]
branches:
- 'v*.*.*'
- master
- develop
- beta
Expand Down Expand Up @@ -120,7 +121,6 @@ jobs:
strip skaled/skaled
cd ..
- name: Configure historic state build
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
export CC=gcc-9
export CXX=g++-9
Expand All @@ -133,7 +133,6 @@ jobs:
cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DHISTORIC_STATE=1 ..
cd ..
- name: Build historic state version
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
export CC=gcc-9
export CXX=g++-9
Expand All @@ -146,7 +145,6 @@ jobs:
strip skaled/skaled
cd ..
- name: Build and publish container
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
cp build/skaled/skaled scripts/skale_build/executable/
export BRANCH=${GITHUB_REF##*/}
Expand All @@ -155,22 +153,22 @@ jobs:
export VERSION=$(bash ./scripts/calculate_version.sh $BRANCH $VERSION)
echo "::set-env name=VERSION::$VERSION"
echo "Version $VERSION"
( test $BRANCH = "stable" && export PRERELEASE=false ) || export PRERELEASE=true
echo "PRERELEASE=$PRERELEASE" >> $GITHUB_ENV
export RELEASE=true
echo "::set-env name=RELEASE::$RELEASE"
bash ./scripts/build_and_publish.sh
- name: Create Release
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.VERSION }}
release_name: ${{ env.VERSION }}
draft: false
prerelease: true
prerelease: ${{ env.PRERELEASE }}
- name: Upload skaled binary to Release
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -180,7 +178,6 @@ jobs:
asset_name: skaled
asset_content_type: application/octet-stream
- name: Build and publish historic-state container
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
run: |
cp build-historic/skaled/skaled scripts/skale_build/executable/
export BRANCH=${GITHUB_REF##*/}
Expand All @@ -192,7 +189,6 @@ jobs:
echo "::set-env name=RELEASE::$RELEASE"
bash ./scripts/build_and_publish.sh
- name: Upload historic-state skaled binary to Release
if: contains(github.ref, 'develop') || contains(github.ref, 'beta') || contains(github.ref, 'master') || contains(github.ref, 'stable')
uses: actions/upload-release-asset@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,17 @@ jobs:
export NO_ULIMIT_CHECK=1
# we specifically run each test for easier log review
./testeth -t BlockchainTests -- --express && touch /tmp/BlockchainTestsPassed
./testeth -t TransitionTests -- --express && touch /tmp/TransitionTestsPassed
./testeth -t TransactionTests -- --express && touch /tmp/TransactionTestsPassed
./testeth -t VMTests -- --express && touch /tmp/VMTestsPassed
./testeth -t LevelDBTests -- --express && touch /tmp/LevelDBTestsPassed
./testeth -t CoreLibTests -- --express && touch /tmp/CoreLibTestsPassed
./testeth -t RlpTests -- --express && touch /tmp/RlpTestsPassed
./testeth -t SharedSpaceTests -- --express && touch /tmp/SharedSpaceTestsPassed
./testeth -t SealEngineTests -- --express && touch /tmp/SealEngineTestsPassed
./testeth -t EthashTests -- --express && touch /tmp/EthashTestsPassed
./testeth -t SealEngineTests -- --express && touch /tmp/SealEngineTestsPassed
./testeth -t DifficultyTests -- --express && touch /tmp/DifficultyTestsPassed
./testeth -t BlockSuite -- --express && touch /tmp/BlockSuitePassed
./testeth -t BlockChainMainNetworkSuite -- --express && touch /tmp/BlockChainMainNetworkSuitePassed
./testeth -t BlockChainFrontierSuite -- --express && touch /tmp/BlockChainFrontierSuitePassed
./testeth -t BlockQueueSuite -- --express && touch /tmp/BlockQueueSuitePassed
Expand Down Expand Up @@ -198,6 +204,9 @@ jobs:
./testeth -t JsonRpcSuite -- --express && touch /tmp/JsonRpcSuitePassed
./testeth -t SingleConsensusTests -- --express && touch /tmp/SingleConsensusTestsPassed
./testeth -t ConsensusTests -- --express && touch /tmp/ConsensusTestsPassed
sudo ./testeth -t BtrfsTestSuite -- --all && touch /tmp/BtrfsTestSuitePassed
sudo ./testeth -t HashSnapshotTestSuite -- --all && touch /tmp/HashSnapshotTestSuitePassed
sudo ./testeth -t ClientSnapshotsSuite -- --all && touch /tmp/ClientSnapshotsSuitePassed
cd ..
- name: Testeth verbosity 4
run : |
Expand All @@ -206,11 +215,17 @@ jobs:
export NO_NTP_CHECK=1
export NO_ULIMIT_CHECK=1
ls /tmp/BlockchainTestsPassed || ./testeth -t BlockchainTests -- --express --verbosity 4
ls /tmp/TransitionTestsPassed || ./testeth -t TransitionTests -- --express --verbosity 4
ls /tmp/TransactionTestsPassed || ./testeth -t TransactionTests -- --express --verbosity 4
ls /tmp/VMTestsPassed || ./testeth -t VMTests -- --express --verbosity 4
ls /tmp/LevelDBTestsPassed || ./testeth -t LevelDBTests -- --express --verbosity 4
ls /tmp/CoreLibTestsPassed || ./testeth -t CoreLibTests -- --express --verbosity 4
ls /tmp/RlpTestsPassed || ./testeth -t RlpTests -- --express --verbosity 4
ls /tmp/SharedSpaceTestsPassed || ./testeth -t SharedSpaceTests -- --express --verbosity 4
ls /tmp/EthashTestsPassed || ./testeth -t EthashTests -- --express --verbosity 4
ls /tmp/SealEngineTestsPassed || ./testeth -t SealEngineTests -- --express --verbosity 4
ls /tmp/DifficultyTestsPassed || ./testeth -t DifficultyTests -- --express --verbosity 4
ls /tmp/BlockSuitePassed || ./testeth -t BlockSuite -- --express --verbosity 4
ls /tmp/BlockChainMainNetworkSuitePassed || ./testeth -t BlockChainMainNetworkSuite -- --express --verbosity 4
ls /tmp/BlockChainFrontierSuitePassed || ./testeth -t BlockChainFrontierSuite -- --express --verbosity 4
ls /tmp/BlockQueueSuitePassed || ./testeth -t BlockQueueSuite -- --express --verbosity 4
Expand Down Expand Up @@ -239,7 +254,10 @@ jobs:
ls /tmp/ClientTestsPassed || ./testeth -t ClientTests -- --express --verbosity 4
ls /tmp/JsonRpcSuitePassed || ./testeth -t JsonRpcSuite -- --express --verbosity 4
ls /tmp/SingleConsensusTestsPassed || ./testeth -t SingleConsensusTests -- --express --verbosity 4
ls /tmp/ConsensusTestsPassed || ./testeth -t ConsensusTests -- --express --verbosity 4
ls /tmp/ConsensusTestsPassed || ./testeth -t ConsensusTests -- --express --verbosity 4
ls /tmp/BtrfsTestSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t BtrfsTestSuite -- --all --verbosity 4
ls /tmp/HashSnapshotTestSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t HashSnapshotTestSuite -- --all --verbosity 4
ls /tmp/ClientSnapshotsSuitePassed || sudo NO_ULIMIT_CHECK=1 NO_NTP_CHECK=1 ./testeth -t ClientSnapshotsSuite -- --all --verbosity 4
cd ..
- name: Configure all as historic
run: |
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Historically skaled started by forking [Aleth](https://github.com/ethereum/aleth

### OS requirements

Skaled builds and runs on Ubuntu 16.04 and 18.04
Skaled builds and runs on Ubuntu 20.04 and 22.04

### Clone repository

Expand All @@ -59,12 +59,12 @@ If you have already cloned the repo and forgot to pass `--recurse-submodules`, e
```
sudo apt update
sudo apt install autoconf build-essential cmake libprocps-dev libtool texinfo wget yasm flex bison btrfs-progs
sudo apt install make build-essential cmake pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev docker.io gprof gcc-9 g++-9
sudo apt install make build-essential cmake pkg-config libgnutls28-dev libssl-dev unzip zlib1g-dev libgcrypt20-dev docker.io gcc-9 g++-9 gperf clang-format-11
```

NB cmake needs to be of version >=3.31, git of version >=2.18

### Set gcc-9 as default compiler
### (for Ubuntu 20.10 or later) Set gcc-9 as default compiler
```
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 9
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 9
Expand Down Expand Up @@ -92,6 +92,7 @@ cd deps
## Hunter fix

```
mkdir -p ~/.hunter/_Base/Download/crc32c/1.0.5/dc7fa8c/
cd ~/.hunter/_Base/Download/crc32c/1.0.5/dc7fa8c/
wget https://github.com/hunter-packages/crc32c/archive/refs/tags/hunter-1.0.5.tar.gz
```
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.16.0
3.16.1
2 changes: 1 addition & 1 deletion cmake/FindClangFormat.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if( ( NOT DEFINED CLANG_FORMAT_BIN_NAME ) OR ( "${CLANG_FORMAT_BIN_NAME}" STREQU
#
unset( CLANG_FORMAT_FOUND )
unset( CLANG_FORMAT_BIN_NAME )
set( VARIANTS_OF_CLANG_FORMAT_BIN_NAME clang-format-10 clang-format )
set( VARIANTS_OF_CLANG_FORMAT_BIN_NAME clang-format-11 clang-format )
foreach( CLANG_FORMAT_WALK_VAR IN LISTS VARIANTS_OF_CLANG_FORMAT_BIN_NAME )
execute_process( COMMAND bash -c "which ${CLANG_FORMAT_WALK_VAR}" OUTPUT_VARIABLE CLANG_FORMAT_BIN_NAME )
if( ( DEFINED CLANG_FORMAT_BIN_NAME ) AND ( NOT "${CLANG_FORMAT_BIN_NAME}" STREQUAL "" ) )
Expand Down
2 changes: 1 addition & 1 deletion libconsensus
Submodule libconsensus updated 47 files
+52 −37 .idea/workspace.xml
+10 −4 SkaleCommon.h
+1 −0 db/BlockProposalDB.cpp
+128 −0 docs/block_signature_verification.md
+38 −0 exceptions/OracleException.cpp
+36 −0 exceptions/OracleException.h
+1 −0 exceptions/ParsingException.h
+1 −0 messages/NetworkMessage.cpp
+0 −1 messages/NetworkMessage.h
+2 −1 network/ZMQNetwork.cpp
+476 −440 node/ConsensusEngine.cpp
+11 −4 node/ConsensusEngine.h
+72 −3 node/ConsensusInterface.h
+22 −2 node/Node.cpp
+7 −2 node/Node.h
+4 −0 node/NodeGettersSetters.cpp
+153 −136 oracle/OracleClient.cpp
+10 −16 oracle/OracleClient.h
+0 −12 oracle/OracleErrors.h
+15 −33 oracle/OracleReceivedResults.cpp
+4 −11 oracle/OracleRequestBroadcastMessage.cpp
+383 −150 oracle/OracleRequestSpec.cpp
+102 −19 oracle/OracleRequestSpec.h
+12 −6 oracle/OracleResponseMessage.cpp
+2 −1 oracle/OracleResponseMessage.h
+205 −477 oracle/OracleResult.cpp
+18 −46 oracle/OracleResult.h
+141 −141 oracle/OracleServerAgent.cpp
+4 −3 oracle/OracleServerAgent.h
+68 −49 oracle/README.md
+11 −0 oracle_test/hardhat/.gitignore
+13 −0 oracle_test/hardhat/README.md
+105 −0 oracle_test/hardhat/contracts/Lock.sol
+112 −0 oracle_test/hardhat/contracts/MultiSend.sol
+22 −0 oracle_test/hardhat/hardhat.config.js
+13 −0 oracle_test/hardhat/package.json
+43 −0 oracle_test/hardhat/scripts/deploy.js
+89 −34 pendingqueue/TestMessageGeneratorAgent.cpp
+6 −0 pendingqueue/TestMessageGeneratorAgent.h
+2 −1 test/fournodes/node1/Node.json
+0 −2 test/fournodes/node1/schains/schain1.json
+2 −1 test/fournodes/node2/Node.json
+0 −1 test/fournodes/node2/schains/schain1.json
+2 −1 test/fournodes/node3/Node.json
+2 −1 test/fournodes/node4/Node.json
+1 −1 test/onenode/node1/Node.json
+2 −1 test/seven_one_catchup/node1/schains/schain1.json
8 changes: 4 additions & 4 deletions libdevcore/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,8 @@ class Timer {
std::chrono::high_resolution_clock::time_point m_t;
};

#define DEV_TIMED( S ) \
for ( ::std::pair<::dev::TimerHelper, bool > __eth_t( S, true ); __eth_t.second; \
#define DEV_TIMED( S ) \
for ( ::std::pair< ::dev::TimerHelper, bool > __eth_t( S, true ); __eth_t.second; \
__eth_t.second = false )
#define DEV_TIMED_SCOPE( S ) ::dev::TimerHelper __eth_t( S )
#if defined( _WIN32 )
Expand All @@ -310,8 +310,8 @@ class Timer {
#define DEV_TIMED_FUNCTION DEV_TIMED_SCOPE( __PRETTY_FUNCTION__ )
#endif

#define DEV_TIMED_ABOVE( S, MS ) \
for ( ::std::pair<::dev::TimerHelper, bool > __eth_t( ::dev::TimerHelper( S, MS ), true ); \
#define DEV_TIMED_ABOVE( S, MS ) \
for ( ::std::pair< ::dev::TimerHelper, bool > __eth_t( ::dev::TimerHelper( S, MS ), true ); \
__eth_t.second; __eth_t.second = false )
#define DEV_TIMED_SCOPE_ABOVE( S, MS ) ::dev::TimerHelper __eth_t( S, MS )
#if defined( _WIN32 )
Expand Down
7 changes: 4 additions & 3 deletions libdevcore/CommonIO.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,10 @@ inline std::string toString(
char buffer[1024];
if ( strftime( buffer, sizeof( buffer ), _format.c_str(), &timeValue ) )
return std::string( buffer ) + "." +
( millisRemainder < 1 ?
"000" :
millisRemainder < 10 ? "00" : millisRemainder < 100 ? "0" : "" ) +
( millisRemainder < 1 ? "000" :
millisRemainder < 10 ? "00" :
millisRemainder < 100 ? "0" :
"" ) +
std::to_string( millisRemainder ) + "Z";
return std::string();
}
Expand Down
6 changes: 3 additions & 3 deletions libdevcrypto/SecretStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ static js::mValue upgraded( string const& _s ) {
if ( v.type() != js::obj_type )
return js::mValue();
js::mObject ret = v.get_obj();
unsigned version = ret.count( "Version" ) ?
stoi( ret["Version"].get_str() ) :
ret.count( "version" ) ? ret["version"].get_int() : 0;
unsigned version = ret.count( "Version" ) ? stoi( ret["Version"].get_str() ) :
ret.count( "version" ) ? ret["version"].get_int() :
0;
if ( version == 1 ) {
// upgrade to version 2
js::mObject old;
Expand Down
2 changes: 1 addition & 1 deletion libethashseal/Ethash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ u256 Ethash::calculateDifficulty( BlockHeader const& _bi, BlockHeader const& _pa
bigint const adjFactor =
_bi.number() < chainParams().byzantiumForkBlock ?
max< bigint >( 1 - timestampDiff / 10, -99 ) : // Homestead-era difficulty
// adjustment
// adjustment
max< bigint >( ( _parent.hasUncles() ? 2 : 1 ) - timestampDiff / 9,
-99 ); // Byzantium-era difficulty adjustment

Expand Down
6 changes: 3 additions & 3 deletions libethereum/BlockChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ string BlockChain::getChainDirName( const ChainParams& _cp ) {
return toHex( BlockHeader( _cp.genesisBlock() ).hash().ref().cropped( 0, 4 ) );
}

BlockChain::BlockChain( ChainParams const& _p, fs::path const& _dbPath, bool _applyPatches,
WithExisting _we ) try : m_lastBlockHashes( new LastBlockHashes( *this ) ),
m_dbPath( _dbPath ) {
BlockChain::BlockChain(
ChainParams const& _p, fs::path const& _dbPath, bool _applyPatches, WithExisting _we ) try
: m_lastBlockHashes( new LastBlockHashes( *this ) ), m_dbPath( _dbPath ) {
init( _p );
open( _dbPath, _applyPatches, _we );
} catch ( ... ) {
Expand Down
12 changes: 5 additions & 7 deletions libethereum/BlockQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -386,13 +386,11 @@ BlockQueueStatus BlockQueue::status() const {

QueueStatus BlockQueue::blockStatus( h256 const& _h ) const {
ReadGuard l( m_lock );
return m_readySet.count( _h ) ?
QueueStatus::Ready :
m_drainingSet.count( _h ) ?
QueueStatus::Importing :
m_unknownSet.count( _h ) ?
QueueStatus::UnknownParent :
m_knownBad.count( _h ) ? QueueStatus::Bad : QueueStatus::Unknown;
return m_readySet.count( _h ) ? QueueStatus::Ready :
m_drainingSet.count( _h ) ? QueueStatus::Importing :
m_unknownSet.count( _h ) ? QueueStatus::UnknownParent :
m_knownBad.count( _h ) ? QueueStatus::Bad :
QueueStatus::Unknown;
}

bool BlockQueue::knownFull() const {
Expand Down
14 changes: 7 additions & 7 deletions libethereum/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,11 +1067,10 @@ void Client::noteChanged( h256Hash const& _filters ) {
w.second.append_changes( m_filters.at( w.second.id ).changes_ );
} else if ( m_specialFilters.count( w.second.id ) )
for ( h256 const& hash : m_specialFilters.at( w.second.id ) ) {
LOG( m_loggerWatch )
<< "!!! " << w.first << " "
<< ( w.second.id == PendingChangedFilter ?
"pending" :
w.second.id == ChainChangedFilter ? "chain" : "???" );
LOG( m_loggerWatch ) << "!!! " << w.first << " "
<< ( w.second.id == PendingChangedFilter ? "pending" :
w.second.id == ChainChangedFilter ? "chain" :
"???" );
w.second.append_changes( LocalisedLogEntry( SpecialLogEntry, hash ) );
}
}
Expand Down Expand Up @@ -1513,11 +1512,12 @@ uint64_t Client::getHistoricRootsDbUsage() const {
}
#endif // HISTORIC_STATE

uint64_t Client::submitOracleRequest( const string& _spec, string& _receipt ) {
uint64_t Client::submitOracleRequest(
const string& _spec, string& _receipt, string& _errorMessage ) {
assert( m_skaleHost );
uint64_t status = -1;
if ( m_skaleHost )
status = m_skaleHost->submitOracleRequest( _spec, _receipt );
status = m_skaleHost->submitOracleRequest( _spec, _receipt, _errorMessage );
else
throw runtime_error( "Instance of SkaleHost was not properly created." );
return status;
Expand Down
2 changes: 1 addition & 1 deletion libethereum/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class Client : public ClientBase, protected Worker {
uint64_t getHistoricRootsDbUsage() const;
#endif // HISTORIC_STATE

uint64_t submitOracleRequest( const string& _spec, string& _receipt );
uint64_t submitOracleRequest( const string& _spec, string& _receipt, string& _errorMessage );
uint64_t checkOracleResult( const string& _receipt, string& _result );

SkaleDebugInterface::handler getDebugHandler() const { return m_debugHandler; }
Expand Down
5 changes: 3 additions & 2 deletions libethereum/SkaleHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -983,8 +983,9 @@ std::array< std::string, 4 > SkaleHost::getIMABLSPublicKey() const {
return m_client.getIMABLSPublicKey();
}

uint64_t SkaleHost::submitOracleRequest( const string& _spec, string& _receipt ) {
return m_consensus->submitOracleRequest( _spec, _receipt );
uint64_t SkaleHost::submitOracleRequest(
const string& _spec, string& _receipt, string& _errorMessage ) {
return m_consensus->submitOracleRequest( _spec, _receipt, _errorMessage );
}

uint64_t SkaleHost::checkOracleResult( const string& _receipt, string& _result ) {
Expand Down
2 changes: 1 addition & 1 deletion libethereum/SkaleHost.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class SkaleHost {
std::map< std::string, uint64_t > getConsensusDbUsage() const;
std::array< std::string, 4 > getIMABLSPublicKey() const;

uint64_t submitOracleRequest( const string& _spec, string& _receipt );
uint64_t submitOracleRequest( const string& _spec, string& _receipt, string& _errorMessage );
uint64_t checkOracleResult( const string& _receipt, string& _result );

void pauseConsensus( bool _pause ) {
Expand Down
3 changes: 2 additions & 1 deletion libhistoric/HistoricState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,8 @@ std::ostream& dev::eth::operator<<( std::ostream& _out, HistoricState const& _s
contout << std::endl
<< ( delta.count( j.first ) ?
back.count( j.first ) ? " * " : " + " :
cached.count( j.first ) ? " . " : " " )
cached.count( j.first ) ? " . " :
" " )
<< std::hex << nouppercase << std::setw( 64 ) << j.first << ": "
<< std::setw( 0 ) << j.second;
else
Expand Down
Loading