Skip to content

Commit

Permalink
Merge branch 'v22-breaking-changes' into dual-soroban-preflight
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Sep 24, 2024
2 parents a84084e + b817750 commit 2b4b1e8
Show file tree
Hide file tree
Showing 53 changed files with 1,443 additions and 1,227 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

## Unreleased


## [v21.5.1](https://github.com/stellar/soroban-rpc/compare/v21.5.0...v21.5.1)

### Fixed
* Preserve field omission behavior of `simulateTransaction` ([#291](https://github.com/stellar/soroban-rpc/pull/291)).

## [v21.5.0](https://github.com/stellar/soroban-rpc/compare/v21.4.1...v21.5.0)

### Added

- Add `EndLedger` in `GetEventsRequest`. This provides finer control and clarity on the range of ledgers being queried.
Expand Down
58 changes: 0 additions & 58 deletions RELEASING.md

This file was deleted.

2 changes: 1 addition & 1 deletion cmd/soroban-rpc/internal/config/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/spf13/pflag"
)

// Init adds the CLI flags to the command. This lets the command output the
// AddFlags Init adds the CLI flags to the command. This lets the command output the
// flags as part of the --help output.
func (cfg *Config) AddFlags(cmd *cobra.Command) error {
cfg.flagset = cmd.PersistentFlags()
Expand Down
9 changes: 0 additions & 9 deletions cmd/soroban-rpc/internal/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type Config struct {
CoreRequestTimeout time.Duration
DefaultEventsLimit uint
DefaultTransactionsLimit uint
EventLedgerRetentionWindow uint32
FriendbotURL string
HistoryArchiveURLs []string
HistoryArchiveUserAgent string
Expand All @@ -42,7 +41,6 @@ type Config struct {
PreflightEnableDebug bool
SQLiteDBPath string
HistoryRetentionWindow uint32
TransactionLedgerRetentionWindow uint32
SorobanFeeStatsLedgerRetentionWindow uint32
ClassicFeeStatsLedgerRetentionWindow uint32
RequestBacklogGlobalQueueLimit uint
Expand Down Expand Up @@ -115,13 +113,6 @@ func (cfg *Config) SetValues(lookupEnv func(string) (string, bool)) error {
}
}

// Set to the maximum as a compromise until we deprecate the transaction/event flags
cfg.HistoryRetentionWindow = max(
cfg.HistoryRetentionWindow,
cfg.EventLedgerRetentionWindow,
cfg.TransactionLedgerRetentionWindow,
)

return nil
}

Expand Down
6 changes: 4 additions & 2 deletions cmd/soroban-rpc/internal/config/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ func TestLoadConfigPathPrecedence(t *testing.T) {
}))
require.NoError(t, cfg.Validate())

assert.Equal(t, "/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg", cfg.CaptiveCoreConfigPath, "should read values from the config path file")
assert.Equal(t, "/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg", cfg.CaptiveCoreConfigPath,
"should read values from the config path file")
assert.Equal(t, "CLI test passphrase", cfg.NetworkPassphrase, "cli flags should override --config-path values")
assert.Equal(t, "/usr/overridden/stellar-core", cfg.StellarCoreBinaryPath, "cli flags should override --config-path values and env vars")
assert.Equal(t, "/usr/overridden/stellar-core", cfg.StellarCoreBinaryPath,
"cli flags should override --config-path values and env vars")
assert.Equal(t, "/env/overridden/db", cfg.SQLiteDBPath, "env var should override config file")
assert.Equal(t, 2*time.Second, cfg.CoreRequestTimeout, "default value should be used, if not set anywhere else")
}
Expand Down
Loading

0 comments on commit 2b4b1e8

Please sign in to comment.