Skip to content

Commit ac3b7db

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 fbb53d8 commit ac3b7db

22 files changed

+1875
-1041
lines changed

Builds/VisualStudio/stellar-core.vcxproj

+1
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ exit /b 0
596596
<ClCompile Include="..\..\src\ledger\LedgerHeaderUtils.cpp" />
597597
<ClCompile Include="..\..\src\ledger\LedgerManagerImpl.cpp" />
598598
<ClCompile Include="..\..\src\ledger\LedgerRange.cpp" />
599+
<ClCompile Include="..\..\src\ledger\LedgerStateSnapshot.cpp" />
599600
<ClCompile Include="..\..\src\ledger\LedgerTxn.cpp" />
600601
<ClCompile Include="..\..\src\ledger\LedgerTxnAccountSQL.cpp" />
601602
<ClCompile Include="..\..\src\ledger\LedgerTxnClaimableBalanceSQL.cpp" />

Builds/VisualStudio/stellar-core.vcxproj.filters

+3
Original file line numberDiff line numberDiff line change
@@ -1377,6 +1377,9 @@
13771377
<ClCompile Include="..\..\src\main\QueryServer.cpp">
13781378
<Filter>main</Filter>
13791379
</ClCompile>
1380+
<ClCompile Include="..\..\src\ledger\LedgerStateSnapshot.cpp">
1381+
<Filter>ledger</Filter>
1382+
</ClCompile>
13801383
</ItemGroup>
13811384
<ItemGroup>
13821385
<ClInclude Include="..\..\lib\util\cpptoml.h">

src/herder/HerderImpl.cpp

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

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

1419-
TxSetPhaseTransactions invalidTxPhases;
1419+
PerPhaseTransactionList invalidTxPhases;
14201420
invalidTxPhases.resize(txPhases.size());
14211421

14221422
auto [proposedSet, applicableProposedSet] =

src/herder/TransactionQueue.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -868,11 +868,11 @@ TransactionQueue::isBanned(Hash const& hash) const
868868
});
869869
}
870870

871-
TxSetTransactions
871+
TxFrameList
872872
TransactionQueue::getTransactions(LedgerHeader const& lcl) const
873873
{
874874
ZoneScoped;
875-
TxSetTransactions txs;
875+
TxFrameList txs;
876876

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