Skip to content

Commit 93c9541

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 bfd1cc2 commit 93c9541

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

940-
TxSetTransactions
940+
TxFrameList
941941
TransactionQueue::getTransactions(LedgerHeader const& lcl) const
942942
{
943943
ZoneScoped;
944-
TxSetTransactions txs;
944+
TxFrameList txs;
945945

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