diff --git a/ingest/CHANGELOG.md b/ingest/CHANGELOG.md index 1aab4ae542..ed168de74e 100644 --- a/ingest/CHANGELOG.md +++ b/ingest/CHANGELOG.md @@ -2,8 +2,11 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). - -## Unreleased +### Stellar Core Protocol 21 Configuration Update: +* BucketlistDB is now the default database for stellar-core, replacing the experimental option. As a result, the `EXPERIMENTAL_BUCKETLIST_DB` configuration parameter has been deprecated. +* A new mandatory parameter, `DEPRECATED_SQL_LEDGER_STATE`, has been added with a default value of false which equivalent to `EXPERIMENTAL_BUCKETLIST_DB` being set to true. +* The parameter `EXPERIMENTAL_BUCKETLIST_DB_INDEX_PAGE_SIZE_EXPONENT` has been renamed to `BUCKETLIST_DB_INDEX_PAGE_SIZE_EXPONENT`. +* The parameter `EXPERIMENTAL_BUCKETLIST_DB_INDEX_CUTOFF` has been renamed to `BUCKETLIST_DB_INDEX_CUTOFF`. ### New Features * Support for Soroban and Protocol 20! diff --git a/ingest/ledgerbackend/toml.go b/ingest/ledgerbackend/toml.go index 84c5dbdb33..e23a771748 100644 --- a/ingest/ledgerbackend/toml.go +++ b/ingest/ledgerbackend/toml.go @@ -101,7 +101,7 @@ type captiveCoreTomlValues struct { QuorumSetEntries map[string]QuorumSet `toml:"-"` BucketListDBPageSizeExp *uint `toml:"BUCKETLIST_DB_INDEX_PAGE_SIZE_EXPONENT,omitempty"` BucketListDBCutoff *uint `toml:"BUCKETLIST_DB_INDEX_CUTOFF,omitempty"` - DeprecatedSqlLedgerState bool `toml:"DEPRECATED_SQL_LEDGER_STATE"` + DeprecatedSqlLedgerState *bool `toml:"DEPRECATED_SQL_LEDGER_STATE,omitempty"` EnableSorobanDiagnosticEvents *bool `toml:"ENABLE_SOROBAN_DIAGNOSTIC_EVENTS,omitempty"` TestingMinimumPersistentEntryLifetime *uint `toml:"TESTING_MINIMUM_PERSISTENT_ENTRY_LIFETIME,omitempty"` TestingSorobanHighLimitOverride *bool `toml:"TESTING_SOROBAN_HIGH_LIMIT_OVERRIDE,omitempty"` @@ -539,14 +539,15 @@ func (c *CaptiveCoreToml) setDefaults(params CaptiveCoreTomlParams) { } currentCoreVersion := checkCoreVersionF(params.CoreBinaryPath) + deprecatedSqlLedgerState := false if !params.UseDB { - c.DeprecatedSqlLedgerState = true + deprecatedSqlLedgerState = true } else { if !c.tree.Has("BUCKETLIST_DB_INDEX_PAGE_SIZE_EXPONENT") { c.BucketListDBPageSizeExp = &DefaultBucketListDBPageSize } - c.DeprecatedSqlLedgerState = false } + c.DeprecatedSqlLedgerState = &deprecatedSqlLedgerState if !c.tree.Has("NETWORK_PASSPHRASE") { c.NetworkPassphrase = params.NetworkPassphrase diff --git a/ingest/ledgerbackend/toml_test.go b/ingest/ledgerbackend/toml_test.go index 5eceb27af8..4fc61f1133 100644 --- a/ingest/ledgerbackend/toml_test.go +++ b/ingest/ledgerbackend/toml_test.go @@ -514,7 +514,7 @@ func TestDBConfigDefaultsToSqlite(t *testing.T) { toml := CaptiveCoreToml{} require.NoError(t, toml.unmarshal(configBytes, true)) assert.Equal(t, toml.Database, "sqlite3://stellar.db") - assert.Equal(t, toml.DeprecatedSqlLedgerState, false) + assert.Equal(t, *toml.DeprecatedSqlLedgerState, false) assert.Equal(t, *toml.BucketListDBPageSizeExp, DefaultBucketListDBPageSize) assert.Equal(t, toml.BucketListDBCutoff, (*uint)(nil)) }