Skip to content

Commit 7b3f78e

Browse files
committed
Add support for the max number of dependent tx clusters per ledger setting.
Most of the code is guarded behind the vnext protocol macro and this is a no-op for now. This also required the XDR bump, which in turn required an env bump, which is why I've created a new submodule for p23 env.
1 parent 20e2d30 commit 7b3f78e

14 files changed

+624
-63
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@
3737
[submodule "src/rust/soroban/p22"]
3838
path = src/rust/soroban/p22
3939
url = https://github.com/stellar/rs-soroban-env
40+
[submodule "src/rust/soroban/p23"]
41+
path = src/rust/soroban/p23
42+
url = https://github.com/stellar/rs-soroban-env.git

Builds/VisualStudio/build_rust.bat

+3-2
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,6 @@ if "%version%"=="" (
3030
)
3131

3232
%set_linker_flags% & cd %project_dir%\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo +%version% build %release_profile% --package soroban-env-host --locked --target-dir %out_dir%\soroban-p21-target
33-
%set_linker_flags% & cd %project_dir%\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo +%version% build %release_profile% --package soroban-env-host %features% --locked --target-dir %out_dir%\soroban-p22-target
34-
cd %project_dir% & cargo +%version% rustc %release_profile% --package stellar-core --locked --target-dir %out_dir%\target -- --extern soroban_env_host_p21=%out_dir%\soroban-p21-target\%2\libsoroban_env_host.rlib --extern soroban_env_host_p22=%out_dir%\soroban-p22-target\%2\libsoroban_env_host.rlib -L dependency=%out_dir%\soroban-p21-target\%2\deps -L dependency=%out_dir%\soroban-p22-target\%2\deps
33+
%set_linker_flags% & cd %project_dir%\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo +%version% build %release_profile% --package soroban-env-host --locked --target-dir %out_dir%\soroban-p22-target
34+
%set_linker_flags% & cd %project_dir%\src\rust\soroban\p23 & (set RUSTFLAGS=-Cmetadata=p23) & cargo +%version% build %release_profile% --package soroban-env-host --features next --locked --target-dir %out_dir%\soroban-p23-target
35+
cd %project_dir% & cargo +%version% rustc %release_profile% --package stellar-core --locked %features% --target-dir %out_dir%\target -- --extern soroban_env_host_p21=%out_dir%\soroban-p21-target\%2\libsoroban_env_host.rlib --extern soroban_env_host_p22=%out_dir%\soroban-p22-target\%2\libsoroban_env_host.rlib --extern soroban_env_host_p23=%out_dir%\soroban-p23-target\%2\libsoroban_env_host.rlib -L dependency=%out_dir%\soroban-p21-target\%2\deps -L dependency=%out_dir%\soroban-p22-target\%2\deps -L dependency=%out_dir%\soroban-p23-target\%2\deps

Builds/VisualStudio/stellar-core.vcxproj

+3-5
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ exit /b 0
473473
<ClCompile Include="..\..\src\bucket\LiveBucket.cpp" />
474474
<ClCompile Include="..\..\src\bucket\LiveBucketList.cpp" />
475475
<ClCompile Include="..\..\src\bucket\MergeKey.cpp" />
476-
<ClCompile Include="..\..\src\bucket\PublishQueueBuckets.cpp" />
477476
<ClCompile Include="..\..\src\bucket\SearchableBucketList.cpp" />
478477
<ClCompile Include="..\..\src\bucket\test\BucketIndexTests.cpp" />
479478
<ClCompile Include="..\..\src\bucket\test\BucketListTests.cpp" />
@@ -487,11 +486,11 @@ exit /b 0
487486
<ClCompile Include="..\..\src\catchup\ApplyLedgerWork.cpp" />
488487
<ClCompile Include="..\..\src\catchup\AssumeStateWork.cpp" />
489488
<ClCompile Include="..\..\src\catchup\CatchupConfiguration.cpp" />
490-
<ClCompile Include="..\..\src\catchup\CatchupManagerImpl.cpp" />
491489
<ClCompile Include="..\..\src\catchup\CatchupRange.cpp" />
492490
<ClCompile Include="..\..\src\catchup\CatchupWork.cpp" />
493491
<ClCompile Include="..\..\src\catchup\DownloadApplyTxsWork.cpp" />
494492
<ClCompile Include="..\..\src\catchup\IndexBucketsWork.cpp" />
493+
<ClCompile Include="..\..\src\catchup\LedgerApplyManagerImpl.cpp" />
495494
<ClCompile Include="..\..\src\catchup\ReplayDebugMetaWork.cpp" />
496495
<ClCompile Include="..\..\src\catchup\test\CatchupWorkTests.cpp" />
497496
<ClCompile Include="..\..\src\catchup\VerifyLedgerChainWork.cpp" />
@@ -600,7 +599,6 @@ exit /b 0
600599
<ClCompile Include="..\..\src\ledger\LedgerTxnEntry.cpp" />
601600
<ClCompile Include="..\..\src\ledger\LedgerTxnHeader.cpp" />
602601
<ClCompile Include="..\..\src\ledger\LedgerTxnOfferSQL.cpp" />
603-
604602
<ClCompile Include="..\..\src\ledger\LedgerTypeUtils.cpp" />
605603
<ClCompile Include="..\..\src\ledger\NetworkConfig.cpp" />
606604
<ClCompile Include="..\..\src\ledger\test\InMemoryLedgerTxn.cpp" />
@@ -932,7 +930,6 @@ exit /b 0
932930
<ClInclude Include="..\..\src\bucket\LiveBucket.h" />
933931
<ClInclude Include="..\..\src\bucket\LiveBucketList.h" />
934932
<ClInclude Include="..\..\src\bucket\MergeKey.h" />
935-
<ClInclude Include="..\..\src\bucket\PublishQueueBuckets.h" />
936933
<ClInclude Include="..\..\src\bucket\SearchableBucketList.h" />
937934
<ClInclude Include="..\..\src\bucket\test\BucketTestUtils.h" />
938935
<ClInclude Include="..\..\src\catchup\ApplyBucketsWork.h" />
@@ -942,11 +939,12 @@ exit /b 0
942939
<ClInclude Include="..\..\src\catchup\AssumeStateWork.h" />
943940
<ClInclude Include="..\..\src\catchup\CatchupConfiguration.h" />
944941
<ClInclude Include="..\..\src\catchup\CatchupManager.h" />
945-
<ClInclude Include="..\..\src\catchup\CatchupManagerImpl.h" />
946942
<ClInclude Include="..\..\src\catchup\CatchupRange.h" />
947943
<ClInclude Include="..\..\src\catchup\CatchupWork.h" />
948944
<ClInclude Include="..\..\src\catchup\DownloadApplyTxsWork.h" />
949945
<ClInclude Include="..\..\src\catchup\IndexBucketsWork.h" />
946+
<ClInclude Include="..\..\src\catchup\LedgerApplyManager.h" />
947+
<ClInclude Include="..\..\src\catchup\LedgerApplyManagerImpl.h" />
950948
<ClInclude Include="..\..\src\catchup\ReplayDebugMetaWork.h" />
951949
<ClInclude Include="..\..\src\catchup\test\CatchupWorkTests.h" />
952950
<ClInclude Include="..\..\src\catchup\VerifyLedgerChainWork.h" />

Builds/VisualStudio/stellar-core.vcxproj.filters

+9-12
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,6 @@
594594
<ClCompile Include="..\..\src\bucket\MergeKey.cpp">
595595
<Filter>bucket</Filter>
596596
</ClCompile>
597-
<ClCompile Include="..\..\src\bucket\PublishQueueBuckets.cpp">
598-
<Filter>bucket</Filter>
599-
</ClCompile>
600597
<ClCompile Include="..\..\src\catchup\test\CatchupWorkTests.cpp">
601598
<Filter>catchup\tests</Filter>
602599
</ClCompile>
@@ -618,9 +615,6 @@
618615
<ClCompile Include="..\..\src\catchup\CatchupConfiguration.cpp">
619616
<Filter>catchup</Filter>
620617
</ClCompile>
621-
<ClCompile Include="..\..\src\catchup\CatchupManagerImpl.cpp">
622-
<Filter>catchup</Filter>
623-
</ClCompile>
624618
<ClCompile Include="..\..\src\catchup\CatchupRange.cpp">
625619
<Filter>catchup</Filter>
626620
</ClCompile>
@@ -1368,6 +1362,9 @@
13681362
<ClCompile Include="..\..\src\ledger\test\InMemoryLedgerTxnRoot.cpp">
13691363
<Filter>ledger\tests</Filter>
13701364
</ClCompile>
1365+
<ClCompile Include="..\..\src\catchup\LedgerApplyManagerImpl.cpp">
1366+
<Filter>catchup</Filter>
1367+
</ClCompile>
13711368
</ItemGroup>
13721369
<ItemGroup>
13731370
<ClInclude Include="..\..\lib\util\cpptoml.h">
@@ -1808,9 +1805,6 @@
18081805
<ClInclude Include="..\..\src\bucket\MergeKey.h">
18091806
<Filter>bucket</Filter>
18101807
</ClInclude>
1811-
<ClInclude Include="..\..\src\bucket\PublishQueueBuckets.h">
1812-
<Filter>bucket</Filter>
1813-
</ClInclude>
18141808
<ClInclude Include="..\..\src\catchup\test\CatchupWorkTests.h">
18151809
<Filter>catchup\tests</Filter>
18161810
</ClInclude>
@@ -1835,9 +1829,6 @@
18351829
<ClInclude Include="..\..\src\catchup\CatchupManager.h">
18361830
<Filter>catchup</Filter>
18371831
</ClInclude>
1838-
<ClInclude Include="..\..\src\catchup\CatchupManagerImpl.h">
1839-
<Filter>catchup</Filter>
1840-
</ClInclude>
18411832
<ClInclude Include="..\..\src\catchup\CatchupRange.h">
18421833
<Filter>catchup</Filter>
18431834
</ClInclude>
@@ -2413,6 +2404,12 @@
24132404
<ClInclude Include="..\..\src\ledger\test\InMemoryLedgerTxnRoot.h">
24142405
<Filter>ledger\tests</Filter>
24152406
</ClInclude>
2407+
<ClInclude Include="..\..\src\catchup\LedgerApplyManager.h">
2408+
<Filter>catchup</Filter>
2409+
</ClInclude>
2410+
<ClInclude Include="..\..\src\catchup\LedgerApplyManagerImpl.h">
2411+
<Filter>catchup</Filter>
2412+
</ClInclude>
24162413
</ItemGroup>
24172414
<ItemGroup>
24182415
<None Include="..\..\AUTHORS" />

src/herder/Upgrades.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,10 @@ Upgrades::applyVersionUpgrade(Application& app, AbstractLedgerTxn& ltx,
12201220
{
12211221
SorobanNetworkConfig::createCostTypesForV22(ltx, app);
12221222
}
1223+
if (needUpgradeToVersion(ProtocolVersion::V_23, prevVersion, newVersion))
1224+
{
1225+
SorobanNetworkConfig::createLedgerEntriesForV23(ltx, app);
1226+
}
12231227
}
12241228

12251229
void

0 commit comments

Comments
 (0)