Skip to content

Commit ba8470e

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 16bc340 commit ba8470e

24 files changed

+2226
-1372
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
@@ -938,11 +938,11 @@ TransactionQueue::isBanned(Hash const& hash) const
938938
});
939939
}
940940

941-
TxSetTransactions
941+
TxFrameList
942942
TransactionQueue::getTransactions(LedgerHeader const& lcl) const
943943
{
944944
ZoneScoped;
945-
TxSetTransactions txs;
945+
TxFrameList txs;
946946

947947
uint32_t const nextLedgerSeq = lcl.ledgerSeq + 1;
948948
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)