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

3.20.0 beta #2028

Merged
merged 118 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
118 commits
Select commit Hold shift + click to select a range
a4ff975
Update VERSION
DmytroNazarenko May 17, 2024
7976a2c
Merge pull request #1903 from skalenetwork/DmytroNazarenko-patch-1
DmytroNazarenko May 17, 2024
8a13c04
IS 968 add historic data to archive node snapshot
olehnikolaiev May 21, 2024
fe94fa4
IS 968 download snapshot from archive node
olehnikolaiev May 21, 2024
5b0a97f
IS 968 remove cc logs
olehnikolaiev May 21, 2024
88e6ef3
IS 968 change ipToDownloadSnapshotFrom to url
olehnikolaiev May 21, 2024
a56e073
IS 968 add core and archive volumes for snapshots
olehnikolaiev May 21, 2024
ce79112
IS 968 add archiveNodeSnapshotsPatch and tests
olehnikolaiev May 22, 2024
879e3c5
IS 968 add tests
olehnikolaiev May 22, 2024
e6d78e5
fix tests
olehnikolaiev May 22, 2024
e97a74b
fix tests
olehnikolaiev May 22, 2024
9fd6db8
fix tests
olehnikolaiev May 22, 2024
4a5b2f8
IS 968 update functional tests
olehnikolaiev May 23, 2024
76136f1
IS-968 fix downloading from archive to core
olehnikolaiev May 29, 2024
2943bee
IS 968 small improvements
olehnikolaiev Jun 12, 2024
7165e07
IS-552 disable heartbeat on pub site
dimalit Jul 1, 2024
ec72c81
IS 968 remove patch
olehnikolaiev Jul 2, 2024
82e4b21
IS 968 fix snapshot downloading to archive node
olehnikolaiev Jul 2, 2024
ae877ba
IS 968 fix sleep
olehnikolaiev Jul 3, 2024
1c61fca
IS 968 fix sleep
olehnikolaiev Jul 3, 2024
a8aaefd
Merge branch 'v3.20.0' into develop-to-v20
DmytroNazarenko Jul 3, 2024
01dbc36
Merge pull request #1934 from skalenetwork/develop-to-v20
DmytroNazarenko Jul 3, 2024
c16850a
Merge remote-tracking branch 'origin/v3.20.0' into bug/IS-552-zmq-assert
dimalit Jul 3, 2024
9cd9458
IS-552 fix build
dimalit Jul 3, 2024
7b31cd6
IS 968 indexer node
olehnikolaiev Jul 4, 2024
c1f0dc2
IS 968 fix format
olehnikolaiev Jul 5, 2024
4af4b14
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
dimalit Jul 8, 2024
b0f2319
#1741 move tracing api to the separate server
olehnikolaiev Jul 8, 2024
8734215
#1741 fix historic build
olehnikolaiev Jul 8, 2024
d6f305d
#1741 fix tracing api methods name
olehnikolaiev Jul 9, 2024
6192ce6
Merge branch 'enhancement/1741-tracing-api-server' of github.com:skal…
olehnikolaiev Jul 9, 2024
988f116
IS-1022 Try separate OverlayFS
dimalit Jul 11, 2024
827c34d
IS-1022 Prettier precompileds
dimalit Jul 16, 2024
3561ea7
Merge branch 'develop' into v3.20.0
kladkogex Jul 17, 2024
e5570aa
Merge branch 'v3.20.0' into bug/IS-1022-sigsegv-in-rollback
dimalit Jul 17, 2024
5c2a968
IS-1022 Prettier solution
dimalit Jul 17, 2024
1908b69
IS-1022 remove unneeded test
dimalit Jul 17, 2024
1cf5f60
IS-1022 Remove unused
dimalit Jul 17, 2024
ceed972
IS-1022 Cosmetic changes
dimalit Jul 17, 2024
b49c0b9
IS-1022 Correct consensus
dimalit Jul 18, 2024
c9c69b2
IS-552 Use correct consensus
dimalit Jul 18, 2024
4805729
Merge branch 'v3.20.0' into bug/IS-552-zmq-assert
dimalit Jul 18, 2024
90766d7
IS-1022 Remove dead code and throw on nullptr
dimalit Jul 19, 2024
ba8b679
Merge branch 'v3.20.0' into enhancement/1741-tracing-api-server
olehnikolaiev Jul 22, 2024
09411f7
#1741 small fixes in tests
olehnikolaiev Jul 22, 2024
c1eb270
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
olehnikolaiev Jul 22, 2024
96a9822
Merge pull request #1940 from skalenetwork/enhancement/1741-tracing-a…
olehnikolaiev Jul 23, 2024
de17006
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
olehnikolaiev Jul 23, 2024
2adaa64
Merge branch 'v3.20.0' into bug/IS-552-zmq-assert
dimalit Jul 23, 2024
a958b42
IS 968 update tests
olehnikolaiev Jul 25, 2024
f5697cc
IS 968 format
olehnikolaiev Jul 25, 2024
37cd330
IS 968 small improvements
olehnikolaiev Jul 25, 2024
ef43668
IS 968 disable tessts
olehnikolaiev Jul 25, 2024
1e67c5f
Merge branch 'v3.20.0' into bug/IS-1022-sigsegv-in-rollback
dimalit Jul 25, 2024
b6f6874
fix yml tests
olehnikolaiev Jul 26, 2024
cd95c2b
IS-552 Use 15 sec keepalive
dimalit Aug 2, 2024
a21e9ad
Merge pull request #1947 from skalenetwork/bug/IS-1022-sigsegv-in-rol…
DmytroNazarenko Aug 5, 2024
4dc9fc3
Merge branch 'v3.20.0' into bug/IS-552-zmq-assert
dimalit Aug 6, 2024
39b6d8e
Merge pull request #1948 from skalenetwork/bug/IS-552-zmq-assert
dimalit Aug 6, 2024
c319ded
SKALED-1935 Fix skale-vm build
dimalit Aug 8, 2024
11027a2
SKALED-1900 Release build
dimalit Aug 20, 2024
b103445
SKALED-1900 Do not strip
dimalit Aug 21, 2024
5ff07a7
SKALED-1900 Use -s for stripping symbols
dimalit Aug 21, 2024
4d34648
SKALED-1900 Use RelWithDebInfo in separate binary
dimalit Aug 23, 2024
12ae82e
SKALED-1900 Use strip on original skaled
dimalit Aug 23, 2024
bbf272c
Use built-in ctest in test.ClientBase
dimalit Aug 27, 2024
2f70838
SKALED-1935 make skale-vm not crash
dimalit Aug 28, 2024
16b02a3
SKALED-1900 Keep debug info in folly if build is debug
dimalit Aug 28, 2024
40c668d
SKALED-1900 Add Release into custom_build.yml
dimalit Aug 28, 2024
a6409d1
SKALED-1900 Pre-install liblz4
dimalit Aug 28, 2024
616b6d4
Use RelWithDebInfo in publish.yml
dimalit Aug 28, 2024
3859a55
SKALED-1900 Add check in custom build
dimalit Aug 28, 2024
c2dd5c6
Merge pull request #1968 from skalenetwork/enhancement/SKALED-1935-fu…
dimalit Sep 13, 2024
a145022
Merge branch 'v3.20.0' into enhancement/SKALED-1900-release-build-deb…
dimalit Sep 13, 2024
5ee9c66
SKALED-1951 Fixed some --all unit tests
dimalit Sep 18, 2024
b119c8b
SKALED-1951 Back to 64k contract size limit
dimalit Sep 19, 2024
3c1ba24
SKALED-1951 reset() external gas in ignoreExternalGas() for tests
dimalit Sep 19, 2024
67f6163
Merge remote-tracking branch 'origin/v3.20.0' into bug/SKALED-1951-br…
dimalit Sep 19, 2024
901a1b2
SKALED-1951 Disable --all tests that require maxCodeSize 0x6000
dimalit Sep 19, 2024
ce7abdc
SKALED-1900 Do not build with liblz4
dimalit Sep 23, 2024
69f689c
SKALED-1900 Remove liblz4 from publish.yml
dimalit Sep 23, 2024
7e86921
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
olehnikolaiev Sep 25, 2024
b76f2c1
SKALED-1951 Fix CommonJSTests
dimalit Sep 26, 2024
cb87613
Merge pull request #1969 from skalenetwork/enhancement/SKALED-1900-re…
dimalit Sep 27, 2024
fc39a25
Merge branch 'v3.20.0' into bug/SKALED-1951-broken-all-tests
dimalit Sep 27, 2024
032df80
IS-894 Reenable state root check
DmytroNazarenko Sep 27, 2024
509aee9
Revert "SKALED-1900 release build with separate debug info"
DmytroNazarenko Sep 27, 2024
3833d5e
Merge pull request #2013 from skalenetwork/revert-1969-enhancement/SK…
DmytroNazarenko Sep 27, 2024
0b091d9
SKALED-1900 Fix static livuv
dimalit Sep 30, 2024
67749fb
SKALED=1900 Use upload-artifact v4
dimalit Sep 30, 2024
a486b0b
Merge pull request #2014 from skalenetwork/enhancement/SKALED-1900-re…
dimalit Sep 30, 2024
a1d8229
Merge branch 'v3.20.0' into bug/SKALED-1951-broken-all-tests
dimalit Sep 30, 2024
e96df22
SKALED-1951 Remove commented code
dimalit Oct 2, 2024
244bcb8
Merge pull request #1997 from skalenetwork/bug/SKALED-1951-broken-all…
DmytroNazarenko Oct 3, 2024
a3d84e3
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
olehnikolaiev Oct 7, 2024
75549ce
IS 968 cleanup
olehnikolaiev Oct 8, 2024
f56a433
IS 968 cleanup
olehnikolaiev Oct 8, 2024
2c57656
IS 968 cleanup
olehnikolaiev Oct 8, 2024
b924d00
IS 968 cleanup
olehnikolaiev Oct 8, 2024
2bc3b50
IS 968 update tests
olehnikolaiev Oct 9, 2024
c421551
Merge branch 'v3.20.0' into enhancement/enable-state-root-check
DmytroNazarenko Oct 9, 2024
1da0780
IS 968 fix historic build
olehnikolaiev Oct 9, 2024
56a1549
Merge branch 'v3.20.0' into develop-to-3.20.0
DmytroNazarenko Oct 10, 2024
bdf628b
Merge pull request #2020 from skalenetwork/develop-to-3.20.0
DmytroNazarenko Oct 10, 2024
dff39db
IS 968 remove full snapshot hash for archive
olehnikolaiev Oct 10, 2024
c973a0e
Merge branch 'v3.20.0' into enhancement/enable-state-root-check
DmytroNazarenko Oct 10, 2024
52458c2
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
olehnikolaiev Oct 14, 2024
9b436bc
Merge pull request #2022 from skalenetwork/enhancement/enable-state-r…
DmytroNazarenko Oct 14, 2024
885c12a
Merge branch 'v3.20.0' into feature/IS-968-archive-node-snapshot
olehnikolaiev Oct 14, 2024
7a577a4
IS 968 tests
olehnikolaiev Oct 14, 2024
5472a39
Merge branch 'feature/IS-968-archive-node-snapshot' of github.com:ska…
olehnikolaiev Oct 14, 2024
c2faa3c
IS 968 tests
olehnikolaiev Oct 14, 2024
c9d7dc0
IS 968 change snapshot download limits for archive node
olehnikolaiev Oct 15, 2024
badef22
IS 968 cleanup
olehnikolaiev Oct 16, 2024
af1a452
IS 968
olehnikolaiev Oct 16, 2024
c13e6b0
Merge pull request #1937 from skalenetwork/feature/IS-968-archive-nod…
DmytroNazarenko Oct 17, 2024
ea9bf84
Merge pull request #2027 from skalenetwork/v3.20.0
DmytroNazarenko Oct 17, 2024
afb8365
Merge branch 'beta' into develop
DmytroNazarenko Oct 17, 2024
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/functional-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
repository: skalenetwork/skale-ci-integration_tests
ref: master
ref: v3.20.0
submodules: recursive
- name: Set up Node
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ jobs:
sudo rm -rf /tmp/tests/*
cd build/test
export NO_NTP_CHECK=1
export NO_ULIMIT_CHECK=1
export NO_ULIMIT_CHECK=1
function run_test() { ./testeth --report_level=detailed -t "$1" -- --express && touch "/tmp/tests/${1}Passed"; }
run_test TransitionTests
run_test TransactionTests
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.19.3
3.20.0
2 changes: 1 addition & 1 deletion cmake/EthUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ macro(eth_add_test NAME)
add_custom_target("test.${NAME}"
DEPENDS testeth
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND} -DETH_TEST_NAME="${NAME}" -DCTEST_COMMAND="${CTEST_COMMAND}" -P "${ETH_SCRIPTS_DIR}/runtest.cmake"
COMMAND ${CMAKE_COMMAND} -DETH_TEST_NAME="${NAME}" -DCTEST_COMMAND="${CMAKE_CTEST_COMMAND}" -P "${ETH_SCRIPTS_DIR}/runtest.cmake"
)

endmacro()
Expand Down
32 changes: 25 additions & 7 deletions deps/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1158,16 +1158,20 @@ then
#
echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}"
cd libuv
eval ./autogen.sh
eval ./configure "${CONF_CROSSCOMPILING_OPTS_GENERIC}" --enable-static --disable-shared --with-pic --prefix="$INSTALL_ROOT" "${CONF_DEBUG_OPTIONS}"
# eval ./autogen.sh
# eval ./configure "${CONF_CROSSCOMPILING_OPTS_GENERIC}" --enable-static --disable-shared --with-pic --prefix="$INSTALL_ROOT" "${CONF_DEBUG_OPTIONS}"
#--with-sysroot=="$INSTALL_ROOT"
cd ..
mkdir build && cd build
eval "$CMAKE" "${CMAKE_CROSSCOMPILING_OPTS}" -DCMAKE_INSTALL_PREFIX="$INSTALL_ROOT" -DCMAKE_BUILD_TYPE="$TOP_CMAKE_BUILD_TYPE" \
-DBUILD_SHARED_LIBS=OFF -DLIBUV_BUILD_SHARED=OFF\
..
cd ../..
fi
echo -e "${COLOR_INFO}building it${COLOR_DOTS}...${COLOR_RESET}"
cd libuv
cd libuv/build
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}"
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" install
cd ..
cd ../..
cd "$SOURCES_ROOT"
else
echo -e "${COLOR_SUCCESS}SKIPPED${COLOR_RESET}"
Expand Down Expand Up @@ -1391,13 +1395,21 @@ then
cd boost_1_68_0
echo -e "${COLOR_INFO}configuring and building it${COLOR_DOTS}...${COLOR_RESET}"
eval ./bootstrap.sh --prefix="$INSTALL_ROOT" --with-libraries=atomic,context,filesystem,program_options,regex,system,thread,date_time,iostreams

if [ "$DEBUG" = "1" ]; then
variant=debug
else
variant=release
fi

if [ ${ARCH} = "arm" ]
then
sed -i -e 's#using gcc ;#using gcc : arm : /usr/local/toolchains/gcc7.2-arm/bin/arm-linux-gnueabihf-g++ ;#g' project-config.jam
eval ./b2 "${CONF_CROSSCOMPILING_OPTS_BOOST}" cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install
eval ./b2 "${CONF_CROSSCOMPILING_OPTS_BOOST}" cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=$variant link=static threading=multi install
else
eval ./b2 cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=debug link=static threading=multi install
eval ./b2 cxxflags=-fPIC cflags=-fPIC "${PARALLEL_MAKE_OPTIONS}" --prefix="$INSTALL_ROOT" --layout=system variant=$variant link=static threading=multi install
fi

cd ..
cd "$SOURCES_ROOT"
else
Expand Down Expand Up @@ -2082,6 +2094,7 @@ then
eval tar -xzf folly-from-git.tar.gz
fi
echo -e "${COLOR_INFO}fixing it${COLOR_DOTS}...${COLOR_RESET}"
sed -i 's/list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES})/list(APPEND FOLLY_LINK_LIBRARIES ${LIBUNWIND_LIBRARIES} lzma)/' ./folly/CMake/folly-deps.cmake
sed -i 's/google::InstallFailureFunction(abort);/google::InstallFailureFunction( reinterpret_cast < google::logging_fail_func_t > ( abort ) );/g' ./folly/folly/init/Init.cpp
echo -e "${COLOR_INFO}configuring it${COLOR_DOTS}...${COLOR_RESET}"
cd folly
Expand All @@ -2091,6 +2104,8 @@ then
-DBOOST_ROOT="$INSTALL_ROOT" -DBOOST_LIBRARYDIR="$INSTALL_ROOT/lib" -DBoost_NO_WARN_NEW_VERSIONS=1 -DBoost_DEBUG=ON \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTS=OFF -DBUILD_BROKEN_TESTS=OFF -DBUILD_HANGING_TESTS=OFF -DBUILD_SLOW_TESTS=OFF \
-DCMAKE_INCLUDE_PATH="${INSTALL_ROOT}/include" \
-DCMAKE_LIBRARY_PATH="${INSTALL_ROOT}/lib" \
..
cd ..
else
Expand All @@ -2100,6 +2115,9 @@ then
cd build2
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}"
eval "$MAKE" "${PARALLEL_MAKE_OPTIONS}" install
if [ "$DEBUG" = "0" ]; then
eval strip --strip-debug "${INSTALL_ROOT}"/lib/libfolly*.a
fi
cd "$SOURCES_ROOT"
else
echo -e "${COLOR_SUCCESS}SKIPPED${COLOR_RESET}"
Expand Down
4 changes: 3 additions & 1 deletion libethcore/ChainOperationParams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ EVMSchedule const ChainOperationParams::makeEvmSchedule(
result = EIP158Schedule;
else if ( _workingBlockNumber >= EIP150ForkBlock )
result = EIP150Schedule;
else if ( _workingBlockNumber >= homesteadForkBlock )
return HomesteadSchedule;
else
result = HomesteadSchedule;
return FrontierSchedule;

// 2 based on previous - decide by timestamp
if ( PushZeroPatch::isEnabledWhen( _committedBlockTimestamp ) )
Expand Down
11 changes: 7 additions & 4 deletions libethcore/ChainOperationParams.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ class PrecompiledContract {
u256 const& _blockNumber ) const {
return m_cost( _in, _chainParams, _blockNumber );
}
std::pair< bool, bytes > execute( bytesConstRef _in ) const { return m_execute( _in ); }
std::pair< bool, bytes > execute(
bytesConstRef _in, skale::OverlayFS* _overlayFS = nullptr ) const {
return m_execute( _in, _overlayFS );
}

u256 const& startingBlock() const { return m_startingBlock; }

Expand Down Expand Up @@ -270,9 +273,9 @@ struct ChainOperationParams {
Address const& _a, bytesConstRef _in, u256 const& _blockNumber ) const {
return precompiled.at( _a ).cost( _in, *this, _blockNumber );
}
std::pair< bool, bytes > executePrecompiled(
Address const& _a, bytesConstRef _in, u256 const& ) const {
return precompiled.at( _a ).execute( _in );
std::pair< bool, bytes > executePrecompiled( Address const& _a, bytesConstRef _in, u256 const&,
skale::OverlayFS* _overlayFS = nullptr ) const {
return precompiled.at( _a ).execute( _in, _overlayFS );
}
bool precompiledExecutionAllowedFrom(
Address const& _a, Address const& _from, bool _readOnly ) const {
Expand Down
2 changes: 2 additions & 0 deletions libethcore/EVMSchedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ struct EVMSchedule {
};

static const EVMSchedule DefaultSchedule = EVMSchedule();
// Used only in GeneralStateTests --all tests
static const EVMSchedule FrontierSchedule = EVMSchedule( false, false, 21000 );
static const EVMSchedule HomesteadSchedule = EVMSchedule( true, true, 53000 );

static const EVMSchedule EIP150Schedule = [] {
Expand Down
48 changes: 24 additions & 24 deletions libethereum/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,37 +799,37 @@ void Client::onPostStateChanged() {
void Client::startSealing() {
if ( m_wouldSeal == true )
return;
LOG( m_logger ) << cc::notice( "Client::startSealing: " ) << author();
LOG( m_logger ) << "Client::startSealing: " << author();
if ( author() ) {
m_wouldSeal = true;
m_signalled.notify_all();
} else
LOG( m_logger ) << cc::warn( "You need to set an author in order to seal!" );
LOG( m_logger ) << "You need to set an author in order to seal!";
}

void Client::rejigSealing() {
if ( ( wouldSeal() || remoteActive() ) && !isMajorSyncing() ) {
if ( sealEngine()->shouldSeal( this ) ) {
m_wouldButShouldnot = false;

LOG( m_loggerDetail ) << cc::notice( "Rejigging seal engine..." );
LOG( m_loggerDetail ) << "Rejigging seal engine...";
DEV_WRITE_GUARDED( x_working ) {
if ( m_working.isSealed() ) {
LOG( m_logger ) << cc::notice( "Tried to seal sealed block..." );
LOG( m_logger ) << "Tried to seal sealed block...";
return;
}
// TODO is that needed? we have "Generating seal on" below
LOG( m_loggerDetail ) << cc::notice( "Starting to seal block" ) << " "
<< cc::warn( "#" ) << cc::num10( m_working.info().number() );
LOG( m_loggerDetail ) << "Starting to seal block"
<< " #" << m_working.info().number();

// TODO Deduplicate code!
// TODO Deduplicate code
dev::h256 stateRootToSet;
if ( m_snapshotAgent->getLatestSnapshotBlockNumer() > 0 ) {
dev::h256 state_root_hash = this->m_snapshotAgent->getSnapshotHash(
dev::h256 stateRootHash = this->m_snapshotAgent->getSnapshotHash(
m_snapshotAgent->getLatestSnapshotBlockNumer() );
stateRootToSet = state_root_hash;
stateRootToSet = stateRootHash;
}
// propagate current!
// propagate current
else if ( this->number() > 0 ) {
stateRootToSet =
blockInfo( this->hashFromNumber( this->number() ) ).stateRoot();
Expand All @@ -847,15 +847,15 @@ void Client::rejigSealing() {

if ( wouldSeal() ) {
sealEngine()->onSealGenerated( [=]( bytes const& _header ) {
LOG( m_logger ) << cc::success( "Block sealed" ) << " " << cc::warn( "#" )
<< cc::num10( BlockHeader( _header, HeaderData ).number() );
LOG( m_logger ) << "Block sealed"
<< " #" << BlockHeader( _header, HeaderData ).number();
if ( this->submitSealed( _header ) )
m_onBlockSealed( _header );
else
LOG( m_logger ) << cc::error( "Submitting block failed..." );
LOG( m_logger ) << "Submitting block failed...";
} );
ctrace << cc::notice( "Generating seal on " ) << m_sealingInfo.hash( WithoutSeal )
<< " " << cc::warn( "#" ) << cc::num10( m_sealingInfo.number() );
ctrace << "Generating seal on " << m_sealingInfo.hash( WithoutSeal ) << " #"
<< m_sealingInfo.number();
sealEngine()->generateSeal( m_sealingInfo );
}
} else
Expand All @@ -868,24 +868,24 @@ void Client::rejigSealing() {
void Client::sealUnconditionally( bool submitToBlockChain ) {
m_wouldButShouldnot = false;

LOG( m_loggerDetail ) << cc::notice( "Rejigging seal engine..." );
LOG( m_loggerDetail ) << "Rejigging seal engine...";
DEV_WRITE_GUARDED( x_working ) {
if ( m_working.isSealed() ) {
LOG( m_logger ) << cc::notice( "Tried to seal sealed block..." );
LOG( m_logger ) << "Tried to seal sealed block...";
return;
}
// TODO is that needed? we have "Generating seal on" below
LOG( m_loggerDetail ) << cc::notice( "Starting to seal block" ) << " " << cc::warn( "#" )
<< cc::num10( m_working.info().number() );
// latest hash is really updated after NEXT snapshot already started hash computation!
// TODO Deduplicate code!
LOG( m_loggerDetail ) << "Starting to seal block"
<< " #" << m_working.info().number();
// latest hash is really updated after NEXT snapshot already started hash computation
// TODO Deduplicate code
dev::h256 stateRootToSet;
if ( m_snapshotAgent->getLatestSnapshotBlockNumer() > 0 ) {
dev::h256 state_root_hash = this->m_snapshotAgent->getSnapshotHash(
dev::h256 stateRootHash = this->m_snapshotAgent->getSnapshotHash(
m_snapshotAgent->getLatestSnapshotBlockNumer() );
stateRootToSet = state_root_hash;
stateRootToSet = stateRootHash;
}
// propagate current!
// propagate current
else if ( this->number() > 0 ) {
stateRootToSet = blockInfo( this->hashFromNumber( this->number() ) ).stateRoot();
} else {
Expand Down
7 changes: 2 additions & 5 deletions libethereum/Executive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,8 @@ bool Executive::call( CallParameters const& _p, u256 const& _gasPrice, Address c
m_gas = ( u256 )( _p.gas - g );
bytes output;
bool success;
// dev::eth::g_state = m_s.delegateWrite();
dev::eth::g_overlayFS = m_s.fs();
tie( success, output ) =
m_chainParams.executePrecompiled( _p.codeAddress, _p.data, m_envInfo.number() );
// m_s = dev::eth::g_state.delegateWrite();
tie( success, output ) = m_chainParams.executePrecompiled(
_p.codeAddress, _p.data, m_envInfo.number(), m_s.fs().get() );
size_t outputSize = output.size();
m_output = owning_bytes_ref{ std::move( output ), 0, outputSize };
if ( !success ) {
Expand Down
Loading
Loading