Skip to content

Commit

Permalink
Update Core to protocol 22. (#4464)
Browse files Browse the repository at this point in the history
# Description

Update Core to protocol 22 and ungate the tests that rely on the new
protocol.

# Checklist
- [ ] Reviewed the
[contributing](https://github.com/stellar/stellar-core/blob/master/CONTRIBUTING.md#submitting-changes)
document
- [ ] Rebased on top of master (no merge commits)
- [ ] Ran `clang-format` v8.0.0 (via `make format` or the Visual Studio
extension)
- [ ] Compiles
- [ ] Ran all tests
- [ ] If change impacts performance, include supporting evidence per the
[performance
document](https://github.com/stellar/stellar-core/blob/master/performance-eval/performance-eval.md)
  • Loading branch information
dmkozh authored Sep 18, 2024
2 parents 3c3fd65 + 43dd603 commit 92e6ed0
Show file tree
Hide file tree
Showing 62 changed files with 46,071 additions and 1,545 deletions.
2 changes: 2 additions & 0 deletions Builds/VisualStudio/stellar-core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ exit /b 0
<ClCompile Include="..\..\src\ledger\LedgerHeaderUtils.cpp" />
<ClCompile Include="..\..\src\ledger\LedgerManagerImpl.cpp" />
<ClCompile Include="..\..\src\ledger\LedgerRange.cpp" />
<ClCompile Include="..\..\src\ledger\LedgerStateSnapshot.cpp" />
<ClCompile Include="..\..\src\ledger\LedgerTxn.cpp" />
<ClCompile Include="..\..\src\ledger\LedgerTxnAccountSQL.cpp" />
<ClCompile Include="..\..\src\ledger\LedgerTxnClaimableBalanceSQL.cpp" />
Expand Down Expand Up @@ -1041,6 +1042,7 @@ exit /b 0
<ClInclude Include="..\..\src\ledger\LedgerManager.h" />
<ClInclude Include="..\..\src\ledger\LedgerManagerImpl.h" />
<ClInclude Include="..\..\src\ledger\LedgerRange.h" />
<ClInclude Include="..\..\src\ledger\LedgerStateSnapshot.h" />
<ClInclude Include="..\..\src\ledger\LedgerTxn.h" />
<ClInclude Include="..\..\src\ledger\LedgerTxnEntry.h" />
<ClInclude Include="..\..\src\ledger\LedgerTxnHeader.h" />
Expand Down
6 changes: 6 additions & 0 deletions Builds/VisualStudio/stellar-core.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,9 @@
<ClCompile Include="..\..\src\main\QueryServer.cpp">
<Filter>main</Filter>
</ClCompile>
<ClCompile Include="..\..\src\ledger\LedgerStateSnapshot.cpp">
<Filter>ledger</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\lib\util\cpptoml.h">
Expand Down Expand Up @@ -2402,6 +2405,9 @@
<ClInclude Include="..\..\src\main\QueryServer.h">
<Filter>main</Filter>
</ClInclude>
<ClInclude Include="..\..\src\ledger\LedgerStateSnapshot.h">
<Filter>ledger</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\..\AUTHORS" />
Expand Down
2 changes: 1 addition & 1 deletion src/herder/test/HerderTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5556,7 +5556,7 @@ TEST_CASE("SCP message capture from previous ledger", "[herder]")
simulation->addConnection(validatorCKey.getPublicKey(),
validatorBKey.getPublicKey());
simulation->crankUntil(
[&]() { return C->getLedgerManager().getLastClosedLedgerNum() == 3; },
[&]() { return C->getLedgerManager().getLastClosedLedgerNum() >= 3; },
4 * Herder::EXP_LEDGER_TIMESPAN_SECONDS, false);

// C should have 3 EXTERNALIZEs in its scphistory table for ledger 2. This
Expand Down
2 changes: 1 addition & 1 deletion src/main/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

namespace stellar
{
const uint32 Config::CURRENT_LEDGER_PROTOCOL_VERSION = 21
const uint32 Config::CURRENT_LEDGER_PROTOCOL_VERSION = 22
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
+ 1
#endif
Expand Down
2,061 changes: 2,061 additions & 0 deletions src/testdata/ledger-close-meta-v1-protocol-23-soroban.json

Large diffs are not rendered by default.

989 changes: 989 additions & 0 deletions src/testdata/ledger-close-meta-v1-protocol-23.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions src/transactions/test/InvokeHostFunctionTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4331,7 +4331,6 @@ TEST_CASE("Vm instantiation tightening", "[tx][soroban]")
}
}

#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
TEST_CASE("contract constructor support", "[tx][soroban]")
{
Config cfg = getTestConfig();
Expand Down Expand Up @@ -4432,4 +4431,3 @@ TEST_CASE("contract constructor support", "[tx][soroban]")
REQUIRE(invocation.getReturnValue().u32() == 303);
}
}
#endif
2 changes: 0 additions & 2 deletions src/transactions/test/TxEnvelopeTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2493,7 +2493,6 @@ TEST_CASE("soroban txs not allowed before protocol upgrade",
REQUIRE(tx->getResult().result.code() == txMALFORMED);
}

#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
TEST_CASE("XDR protocol compatibility validation", "[tx][envelope]")
{
auto validateTx = [](ProtocolVersion protocolVersion) {
Expand Down Expand Up @@ -2525,7 +2524,6 @@ TEST_CASE("XDR protocol compatibility validation", "[tx][envelope]")
REQUIRE(res->isSuccess());
}
}
#endif

TEST_CASE_VERSIONS("Soroban extension for non-Soroban tx",
"[tx][envelope][soroban]")
Expand Down
Loading

0 comments on commit 92e6ed0

Please sign in to comment.