Skip to content

Commit

Permalink
Initial support for parallel Soroban phase XDR.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dmkozh committed Dec 12, 2024
1 parent 16bc340 commit ba8470e
Show file tree
Hide file tree
Showing 24 changed files with 2,226 additions and 1,372 deletions.
4 changes: 2 additions & 2 deletions src/herder/HerderImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,7 @@ HerderImpl::triggerNextLedger(uint32_t ledgerSeqToTrigger,
// our first choice for this round's set is all the tx we have collected
// during last few ledger closes
auto const& lcl = mLedgerManager.getLastClosedLedgerHeader();
TxSetPhaseTransactions txPhases;
PerPhaseTransactionList txPhases;
txPhases.emplace_back(mTransactionQueue.getTransactions(lcl.header));

if (protocolVersionStartsFrom(lcl.header.ledgerVersion,
Expand Down Expand Up @@ -1415,7 +1415,7 @@ HerderImpl::triggerNextLedger(uint32_t ledgerSeqToTrigger,
upperBoundCloseTimeOffset = nextCloseTime - lcl.header.scpValue.closeTime;
lowerBoundCloseTimeOffset = upperBoundCloseTimeOffset;

TxSetPhaseTransactions invalidTxPhases;
PerPhaseTransactionList invalidTxPhases;
invalidTxPhases.resize(txPhases.size());

auto [proposedSet, applicableProposedSet] =
Expand Down
4 changes: 2 additions & 2 deletions src/herder/TransactionQueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -938,11 +938,11 @@ TransactionQueue::isBanned(Hash const& hash) const
});
}

TxSetTransactions
TxFrameList
TransactionQueue::getTransactions(LedgerHeader const& lcl) const
{
ZoneScoped;
TxSetTransactions txs;
TxFrameList txs;

uint32_t const nextLedgerSeq = lcl.ledgerSeq + 1;
int64_t const startingSeq = getStartingSequenceNumber(nextLedgerSeq);
Expand Down
2 changes: 1 addition & 1 deletion src/herder/TransactionQueue.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class TransactionQueue

bool isBanned(Hash const& hash) const;
TransactionFrameBaseConstPtr getTx(Hash const& hash) const;
TxSetTransactions getTransactions(LedgerHeader const& lcl) const;
TxFrameList getTransactions(LedgerHeader const& lcl) const;
bool sourceAccountPending(AccountID const& accountID) const;

virtual size_t getMaxQueueSizeOps() const = 0;
Expand Down
Loading

0 comments on commit ba8470e

Please sign in to comment.