Skip to content

Commit bda218d

Browse files
committed
Initial support for parallel Soroban phase XDR.
I've tried to minimize the scope of the changes; specifically this doesn't contain any actual logic for the parallel execution (such as data dependency validation and building parallel stages). However, there is still some refactoring that needed to happen in order to support new, more complex tx sets.
1 parent 8565a39 commit bda218d

22 files changed

+2020
-1104
lines changed

src/herder/HerderImpl.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1350,7 +1350,7 @@ HerderImpl::triggerNextLedger(uint32_t ledgerSeqToTrigger,
13501350
// our first choice for this round's set is all the tx we have collected
13511351
// during last few ledger closes
13521352
auto const& lcl = mLedgerManager.getLastClosedLedgerHeader();
1353-
TxSetPhaseTransactions txPhases;
1353+
PerPhaseTransactionList txPhases;
13541354
txPhases.emplace_back(mTransactionQueue.getTransactions(lcl.header));
13551355

13561356
if (protocolVersionStartsFrom(lcl.header.ledgerVersion,
@@ -1415,7 +1415,7 @@ HerderImpl::triggerNextLedger(uint32_t ledgerSeqToTrigger,
14151415
upperBoundCloseTimeOffset = nextCloseTime - lcl.header.scpValue.closeTime;
14161416
lowerBoundCloseTimeOffset = upperBoundCloseTimeOffset;
14171417

1418-
TxSetPhaseTransactions invalidTxPhases;
1418+
PerPhaseTransactionList invalidTxPhases;
14191419
invalidTxPhases.resize(txPhases.size());
14201420

14211421
auto [proposedSet, applicableProposedSet] =

src/herder/TransactionQueue.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -940,11 +940,11 @@ TransactionQueue::isBanned(Hash const& hash) const
940940
});
941941
}
942942

943-
TxSetTransactions
943+
TxFrameList
944944
TransactionQueue::getTransactions(LedgerHeader const& lcl) const
945945
{
946946
ZoneScoped;
947-
TxSetTransactions txs;
947+
TxFrameList txs;
948948

949949
uint32_t const nextLedgerSeq = lcl.ledgerSeq + 1;
950950
int64_t const startingSeq = getStartingSequenceNumber(nextLedgerSeq);

src/herder/TransactionQueue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class TransactionQueue
143143

144144
bool isBanned(Hash const& hash) const;
145145
TransactionFrameBaseConstPtr getTx(Hash const& hash) const;
146-
TxSetTransactions getTransactions(LedgerHeader const& lcl) const;
146+
TxFrameList getTransactions(LedgerHeader const& lcl) const;
147147
bool sourceAccountPending(AccountID const& accountID) const;
148148

149149
virtual size_t getMaxQueueSizeOps() const = 0;

0 commit comments

Comments
 (0)