Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b0738c2
#1621 refactor CTQ-FTQ; add explicit error on queue full
PropzSaladaz Apr 28, 2026
3ac5d0b
#1621 update unit tests
PropzSaladaz Apr 28, 2026
6cf887e
Merge branch 'v5.1.0' into bug/1621-tx-dropped-silently-when-CTQ-full
PropzSaladaz Apr 28, 2026
68a790b
#1621 format
PropzSaladaz Apr 28, 2026
ab007f0
Merge branch 'bug/1621-tx-dropped-silently-when-CTQ-full' of github.c…
PropzSaladaz Apr 28, 2026
db6fb4d
#1621 remove dead code
PropzSaladaz Apr 28, 2026
65042ad
#1621 revert placing dropped txs in FTQ
PropzSaladaz Apr 29, 2026
3e105dd
#1621 remove duplicated functions
PropzSaladaz Apr 29, 2026
39e0fb5
#1621 add promotion cache
PropzSaladaz Apr 30, 2026
31f4cf6
#1621 update unittests
PropzSaladaz Apr 30, 2026
85acd83
#1621 improve doc comments
PropzSaladaz Apr 30, 2026
36f9e29
#1621 fix failing test - pause consensus - make test deterministic
PropzSaladaz May 1, 2026
14c0d38
#1621 add nullptr checks
PropzSaladaz May 1, 2026
21ecf7a
Merge branch 'v5.1.0' into bug/1621-tx-dropped-silently-when-CTQ-full
PropzSaladaz May 20, 2026
0fc7628
#1621 update comments; format
PropzSaladaz May 27, 2026
4ce2d14
#1621 format
PropzSaladaz May 27, 2026
38e4dee
#1621 remove tx only from CTQ
PropzSaladaz May 28, 2026
5c867a6
#1621 move tx queue cleanup after txs are executed
PropzSaladaz May 28, 2026
8b45a3d
#1621 format
PropzSaladaz May 28, 2026
fe18835
#1621 add explicit CTX validation during block processing; move tx qu…
PropzSaladaz Jun 1, 2026
f8cf287
#1621 code format
PropzSaladaz Jun 1, 2026
8f3baeb
#1621 dont remove future txs from queue
PropzSaladaz Jun 1, 2026
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
3 changes: 2 additions & 1 deletion libethcore/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ enum class ImportResult {
Malformed,
SameNonceAlreadyInQueue,
BadChain,
ZeroSignature
ZeroSignature,
QueueIsFull
};

struct ImportRequirements {
Expand Down
1 change: 1 addition & 0 deletions libethcore/Exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ DEV_SIMPLE_EXCEPTION( PreEIP155LegacyTransactionNotAllowed );
DEV_SIMPLE_EXCEPTION( PreEIP155ReplayProtectionViolation );
DEV_SIMPLE_EXCEPTION( PendingTransactionAlreadyExists );
DEV_SIMPLE_EXCEPTION( TransactionAlreadyInChain );
DEV_SIMPLE_EXCEPTION( TransactionQueueIsFull );
DEV_SIMPLE_EXCEPTION( BlockNotFound );
DEV_SIMPLE_EXCEPTION( UnknownParent );
DEV_SIMPLE_EXCEPTION( AddressAlreadyUsed );
Expand Down
29 changes: 13 additions & 16 deletions libethereum/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ void Client::stopWorking() {

m_signalled.notify_all(); // to wake up the thread from Client::doWork()

m_tq.HandleDestruction(); // l_sergiy: destroy transaction queue earlier
m_bq.stop(); // l_sergiy: added to stop block queue processing
m_bq.stop(); // l_sergiy: added to stop block queue processing

m_bc.close();
BOOST_LOG( m_loggerInfo ) << "Blockchain is closed";
Expand Down Expand Up @@ -724,11 +723,10 @@ void Client::onDeadBlocks( h256s const& _blocks, h256Hash& io_changed ) {
for ( auto const& h : _blocks ) {
BOOST_LOG( m_loggerTrace ) << "Dead block: " << h;
for ( auto const& t : bc().transactions( h ) ) {
BOOST_LOG( m_loggerTrace ) << "Resubmitting dead-block transaction "
<< Transaction( t, CheckTransaction::None );
BOOST_LOG( m_loggerTrace ) << "Resubmitting dead-block transaction "
<< Transaction( t, CheckTransaction::None );
m_tq.import( t, IfDropped::Retry );
Transaction tx( t, CheckTransaction::None );
BOOST_LOG( m_loggerTrace ) << "Resubmitting dead-block transaction " << tx;
m_tq.import( tx, IfDropped::Retry, chainParams().isMultiTransactionModeEnabled(),
state().getNonce( tx.sender() ) );
}
}

Expand Down Expand Up @@ -772,7 +770,8 @@ void Client::restartMining() {
for ( auto const& t : m_postSeal.pending() ) {
BOOST_LOG( m_loggerTrace ) << "Resubmitting post-seal transaction " << t;
// ctrace << "Resubmitting post-seal transaction " << t;
auto ir = m_tq.import( t, IfDropped::Retry );
auto ir = m_tq.import( t, IfDropped::Retry,
chainParams().isMultiTransactionModeEnabled(), state().getNonce( t.sender() ) );
if ( ir != ImportResult::Success )
onTransactionQueueReady();
}
Expand Down Expand Up @@ -950,7 +949,7 @@ void Client::sealUnconditionally( bool submitToBlockChain ) {
<< ":TXRS:" << TransactionReceipt::howMany() << ":BLCKS:" << Block::howMany()
<< ":ACCS:" << Account::howMany() << ":BQS:" << BlockQueue::howMany()
<< ":BDS:" << BlockDetails::howMany() << ":TSS:" << TransactionSkeleton::howMany()
<< ":UTX:" << TransactionQueue::UnverifiedTransaction::howMany()
<< ":UTX:" << 0
<< ":VTX:" << TransactionQueue::VerifiedTransaction::howMany()
<< ":CMM:" << bc().getTotalCacheMemory()
<< ":KDS:" << db::LevelDB::getKeyDeletesStats();
Expand Down Expand Up @@ -1224,13 +1223,9 @@ h256 Client::importTransaction( Transaction const& _t, TransactionBroadcast _txO
#endif // BITE

ImportResult res;
if ( chainParams().isMultiTransactionModeEnabled() &&
state.getNonce( _t.sender() ) < _t.nonce() &&
m_tq.maxCurrentNonce( _t.sender() ) != _t.nonce() ) {
res = m_tq.import( _t, IfDropped::Ignore, true );
} else {
res = m_tq.import( _t );
}
auto stateNonce = state.getNonce( _t.sender() );
bool const allowFutureQueue = chainParams().isMultiTransactionModeEnabled();
res = m_tq.import( _t, IfDropped::Ignore, allowFutureQueue, stateNonce );

switch ( res ) {
case ImportResult::Success:
Expand All @@ -1243,6 +1238,8 @@ h256 Client::importTransaction( Transaction const& _t, TransactionBroadcast _txO
BOOST_THROW_EXCEPTION( PendingTransactionAlreadyExists() );
case ImportResult::AlreadyInChain:
BOOST_THROW_EXCEPTION( TransactionAlreadyInChain() );
case ImportResult::QueueIsFull:
BOOST_THROW_EXCEPTION( TransactionQueueIsFull() );
default:
BOOST_THROW_EXCEPTION( UnknownTransactionValidationError() );
}
Expand Down
Loading
Loading