Skip to content

Commit 73babfd

Browse files
authored
Bump to P26 (stellar#5173)
# Description Bump to p26. Also includes xdr and env bumps. <!--- Describe what this pull request does, which issue it's resolving (usually applicable for code changes). ---> # 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)
2 parents 4a759ec + 90e3289 commit 73babfd

86 files changed

Lines changed: 53986 additions & 3393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 18 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Makefile.am

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ SOROBAN_BUILD_DIR=$(abspath $(RUST_BUILD_DIR))/soroban
187187
# variable empty (and include or exclude submodules from the list of
188188
# ALL_SOROBAN_PROTOCOLS as you see fit).
189189

190-
ALL_SOROBAN_PROTOCOLS=p21 p22 p23 p24 p25
191-
WIP_SOROBAN_PROTOCOL=p26
190+
ALL_SOROBAN_PROTOCOLS=p21 p22 p23 p24 p25 p26
191+
WIP_SOROBAN_PROTOCOL=
192192

193193
if ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
194194
ALL_SOROBAN_PROTOCOLS+=$(WIP_SOROBAN_PROTOCOL)

src/herder/Upgrades.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,15 +1425,13 @@ ConfigUpgradeSetFrame::upgradeNeeded(LedgerSnapshot const& ls) const
14251425
{
14261426
// The delta entry has no stored counterpart — it always needs
14271427
// to be applied (it modifies CONFIG_SETTING_FROZEN_LEDGER_KEYS).
1428-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
14291428
if (updatedEntry.configSettingID() ==
14301429
ConfigSettingID::CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA ||
14311430
updatedEntry.configSettingID() ==
14321431
ConfigSettingID::CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA)
14331432
{
14341433
return true;
14351434
}
1436-
#endif
14371435

14381436
LedgerKey key(LedgerEntryType::CONFIG_SETTING);
14391437
key.configSetting().configSettingID = updatedEntry.configSettingID();
@@ -1455,7 +1453,6 @@ ConfigUpgradeSetFrame::applyTo(AbstractLedgerTxn& ltx, Application& app) const
14551453
for (auto const& updatedEntry : mConfigUpgradeSet.updatedEntry)
14561454
{
14571455
auto const id = updatedEntry.configSettingID();
1458-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
14591456
// Delta entries are not stored config entries. They modify the
14601457
// corresponding base entries instead.
14611458
if (id == ConfigSettingID::CONFIG_SETTING_FROZEN_LEDGER_KEYS_DELTA)
@@ -1518,7 +1515,6 @@ ConfigUpgradeSetFrame::applyTo(AbstractLedgerTxn& ltx, Application& app) const
15181515
bypassTxsVec.assign(existing.begin(), existing.end());
15191516
continue;
15201517
}
1521-
#endif
15221518

15231519
LedgerKey key(LedgerEntryType::CONFIG_SETTING);
15241520
key.configSetting().configSettingID = id;

src/herder/test/UpgradesTests.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2797,7 +2797,6 @@ TEST_CASE("upgrade to version 25 and check cost types", "[upgrades]")
27972797
}
27982798
}
27992799

2800-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
28012800
TEST_CASE("upgrade to version 26 and check cost types", "[upgrades]")
28022801
{
28032802
VirtualClock clock;
@@ -2851,7 +2850,6 @@ TEST_CASE("upgrade to version 26 and check cost types", "[upgrades]")
28512850
static_cast<uint32>(ContractCostType::Bn254G1Msm) + 1);
28522851
}
28532852
}
2854-
#endif
28552853

28562854
// There is a subtle inconsistency where for a ledger that upgrades from
28572855
// protocol vN to vN+1 that also changed LedgerCloseMeta version, the ledger

src/ledger/NetworkConfig.cpp

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,6 @@ updateCpuCostParamsEntryForV25(AbstractLedgerTxn& ltxRoot)
634634
void
635635
updateCpuCostParamsEntryForV26(AbstractLedgerTxn& ltxRoot)
636636
{
637-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
638637
LedgerTxn ltx(ltxRoot);
639638

640639
LedgerKey key(CONFIG_SETTING);
@@ -693,7 +692,6 @@ updateCpuCostParamsEntryForV26(AbstractLedgerTxn& ltxRoot)
693692
}
694693
}
695694
ltx.commit();
696-
#endif
697695
}
698696

699697
ConfigSettingEntry
@@ -1136,7 +1134,6 @@ updateMemCostParamsEntryForV25(AbstractLedgerTxn& ltxRoot)
11361134
void
11371135
updateMemCostParamsEntryForV26(AbstractLedgerTxn& ltxRoot)
11381136
{
1139-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
11401137
LedgerTxn ltx(ltxRoot);
11411138

11421139
LedgerKey key(CONFIG_SETTING);
@@ -1190,7 +1187,6 @@ updateMemCostParamsEntryForV26(AbstractLedgerTxn& ltxRoot)
11901187
}
11911188

11921189
ltx.commit();
1193-
#endif
11941190
}
11951191

11961192
ConfigSettingEntry
@@ -1487,7 +1483,6 @@ SorobanNetworkConfig::isValidConfigSettingEntry(ConfigSettingEntry const& cfg,
14871483
MaximumSorobanNetworkConfig::
14881484
BALLOT_TIMEOUT_INCREMENT_MILLISECONDS;
14891485
break;
1490-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
14911486
case ConfigSettingID::CONFIG_SETTING_FROZEN_LEDGER_KEYS:
14921487
// The frozen keys entry itself is always valid (it's just a list of
14931488
// encoded keys). But it cannot be directly upgraded — only the delta
@@ -1575,7 +1570,6 @@ SorobanNetworkConfig::isValidConfigSettingEntry(ConfigSettingEntry const& cfg,
15751570
case ConfigSettingID::CONFIG_SETTING_FREEZE_BYPASS_TXS_DELTA:
15761571
valid = protocolVersionStartsFrom(ledgerVersion, ProtocolVersion::V_26);
15771572
break;
1578-
#endif
15791573
default:
15801574
break;
15811575
}
@@ -1598,12 +1592,9 @@ SorobanNetworkConfig::isNonUpgradeableConfigSettingEntry(
15981592
// never be changed via upgrade
15991593
return cfg ==
16001594
ConfigSettingID::CONFIG_SETTING_LIVE_SOROBAN_STATE_SIZE_WINDOW ||
1601-
cfg == ConfigSettingID::CONFIG_SETTING_EVICTION_ITERATOR
1602-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
1603-
|| cfg == ConfigSettingID::CONFIG_SETTING_FROZEN_LEDGER_KEYS ||
1604-
cfg == ConfigSettingID::CONFIG_SETTING_FREEZE_BYPASS_TXS
1605-
#endif
1606-
;
1595+
cfg == ConfigSettingID::CONFIG_SETTING_EVICTION_ITERATOR ||
1596+
cfg == ConfigSettingID::CONFIG_SETTING_FROZEN_LEDGER_KEYS ||
1597+
cfg == ConfigSettingID::CONFIG_SETTING_FREEZE_BYPASS_TXS;
16071598
}
16081599

16091600
void
@@ -2548,7 +2539,6 @@ void
25482539
SorobanNetworkConfig::loadFrozenLedgerKeys(LedgerSnapshot const& ls)
25492540
{
25502541
ZoneScoped;
2551-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
25522542
mFrozenLedgerKeys.clear();
25532543

25542544
LedgerKey key(CONFIG_SETTING);
@@ -2564,14 +2554,12 @@ SorobanNetworkConfig::loadFrozenLedgerKeys(LedgerSnapshot const& ls)
25642554
xdr::xdr_from_opaque(encodedKey, lk);
25652555
mFrozenLedgerKeys.insert(lk);
25662556
}
2567-
#endif
25682557
}
25692558

25702559
void
25712560
SorobanNetworkConfig::loadFreezeBypassTxs(LedgerSnapshot const& ls)
25722561
{
25732562
ZoneScoped;
2574-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
25752563
mFreezeBypassTxs.clear();
25762564

25772565
LedgerKey key(CONFIG_SETTING);
@@ -2585,15 +2573,13 @@ SorobanNetworkConfig::loadFreezeBypassTxs(LedgerSnapshot const& ls)
25852573
{
25862574
mFreezeBypassTxs.insert(txHash);
25872575
}
2588-
#endif
25892576
}
25902577

25912578
void
25922579
SorobanNetworkConfig::createLedgerEntriesForV26(AbstractLedgerTxn& ltx,
25932580
Application& app)
25942581
{
25952582
ZoneScoped;
2596-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
25972583
ConfigSettingEntry frozenKeysEntry;
25982584
frozenKeysEntry.configSettingID(CONFIG_SETTING_FROZEN_LEDGER_KEYS);
25992585
// Start with an empty frozen keys set
@@ -2613,7 +2599,6 @@ SorobanNetworkConfig::createLedgerEntriesForV26(AbstractLedgerTxn& ltx,
26132599
e.data.configSetting() = bypassTxsEntry;
26142600
inner.create(e);
26152601
inner.commit();
2616-
#endif
26172602
}
26182603

26192604
#ifdef BUILD_TESTS
@@ -2845,17 +2830,10 @@ SorobanNetworkConfig::isValidCostParams(ContractCostParams const& params,
28452830
{
28462831
return static_cast<uint32_t>(ContractCostType::Bn254FrInv) + 1;
28472832
}
2848-
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
28492833
else
28502834
{
28512835
return static_cast<uint32_t>(ContractCostType::Bn254G1Msm) + 1;
28522836
}
2853-
#else
2854-
else
2855-
{
2856-
return static_cast<uint32_t>(ContractCostType::Bn254FrInv) + 1;
2857-
}
2858-
#endif
28592837
};
28602838

28612839
if (params.size() != getNumCostTypes(ledgerVersion))

src/main/Config.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333

3434
namespace stellar
3535
{
36-
uint32 const Config::CURRENT_LEDGER_PROTOCOL_VERSION = 25
36+
uint32 const Config::CURRENT_LEDGER_PROTOCOL_VERSION = 26
3737
#ifdef ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION
3838
+ 1
3939
#endif

src/rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ rev = "688bc34e6cd15c71742139e625268c7f30f55a92"
167167
[dependencies.stellar-quorum-analyzer]
168168
version = "0.1.0"
169169
git = "https://github.com/stellar/stellar-quorum-analyzer"
170-
rev = "956ba5b8d786d755f5c575160dfc1dec6b313f40"
170+
rev = "174d2a89c7e676000ef4ee2998959681a55befec"
171171

172172
[features]
173173

src/rust/soroban/p26

Submodule p26 updated 38 files

src/rust/src/dep-trees/p26-expect.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ soroban-env-host v26.0.0-rc.1 (src/rust/soroban/p26/soroban-env-host)
259259
│ │ │ ├── itoa v1.0.6
260260
│ │ │ ├── ryu v1.0.13
261261
│ │ │ └── serde v1.0.192 (*)
262-
│ │ ├── stellar-xdr v25.0.0 (https://github.com/stellar/rs-stellar-xdr?rev=c458ac6bb943c271332cb8cf274b492433cb763f#c458ac6b)
262+
│ │ ├── stellar-xdr v25.0.0 (https://github.com/stellar/rs-stellar-xdr?rev=99c73b18ccd68bc3439be30801da6261b193d2da#99c73b18)
263263
│ │ │ ├── cfg_eval v0.1.2 (proc-macro)
264264
│ │ │ │ ├── proc-macro2 v1.0.69 (*)
265265
│ │ │ │ ├── quote v1.0.33 (*)
@@ -290,7 +290,7 @@ soroban-env-host v26.0.0-rc.1 (src/rust/soroban/p26/soroban-env-host)
290290
│ │ └── wasmparser-nostd v0.100.2
291291
│ │ └── indexmap-nostd v0.4.0
292292
│ ├── static_assertions v1.1.0
293-
│ ├── stellar-xdr v25.0.0 (https://github.com/stellar/rs-stellar-xdr?rev=c458ac6bb943c271332cb8cf274b492433cb763f#c458ac6b)
293+
│ ├── stellar-xdr v25.0.0 (https://github.com/stellar/rs-stellar-xdr?rev=99c73b18ccd68bc3439be30801da6261b193d2da#99c73b18)
294294
│ │ ├── base64 v0.22.1
295295
│ │ ├── cfg_eval v0.1.2 (proc-macro) (*)
296296
│ │ ├── escape-bytes v0.1.1

0 commit comments

Comments
 (0)