From 4f79508eccdf7dc98dfe7f0066c6c3e3e75a4d1f Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Tue, 19 Nov 2024 11:48:21 +0100 Subject: [PATCH] Rename Soroban RPC to Stellar RPC --- .github/workflows/e2e.yml | 8 ++-- .github/workflows/required_status_check.yml | 2 +- .../{soroban-rpc.yml => stellar-rpc.yml} | 16 +++---- .golangci.yml | 2 +- CHANGELOG.md | 42 +++++++++---------- Cargo.toml | 6 +-- Makefile | 26 ++++++------ README.md | 16 +++---- cmd/{soroban-rpc => stellar-rpc}/README.md | 28 ++++++------- .../docker/Dockerfile | 8 ++-- .../docker/Dockerfile.release | 4 +- .../docker/Makefile | 8 ++-- .../internal/config/flags.go | 0 .../internal/config/log_format.go | 0 .../internal/config/main.go | 4 +- .../internal/config/main_test.go | 4 +- .../internal/config/option.go | 0 .../internal/config/option_test.go | 0 .../internal/config/options.go | 0 .../internal/config/options_test.go | 0 .../internal/config/parse.go | 0 .../internal/config/test.soroban.rpc.config | 6 +-- .../internal/config/toml.go | 0 .../internal/config/toml_test.go | 8 ++-- .../internal/config/version.go | 8 ++-- .../internal/daemon/daemon.go | 16 +++---- .../internal/daemon/interfaces/interfaces.go | 0 .../internal/daemon/interfaces/noOpDaemon.go | 0 .../internal/daemon/metrics.go | 6 +-- .../internal/db/cursor.go | 0 .../internal/db/cursor_test.go | 0 .../internal/db/db.go | 2 +- .../internal/db/event.go | 0 .../internal/db/event_test.go | 2 +- .../internal/db/ledger.go | 2 +- .../internal/db/ledger_test.go | 2 +- .../internal/db/ledgerentry.go | 0 .../internal/db/ledgerentry_test.go | 2 +- .../internal/db/migration.go | 0 .../internal/db/mocks.go | 2 +- .../internal/db/sqlmigrations/01_init.sql | 0 .../db/sqlmigrations/02_transactions.sql | 0 .../internal/db/sqlmigrations/03_events.sql | 0 .../internal/db/sqlmigrations/04_metadata.sql | 0 .../internal/db/transaction.go | 2 +- .../internal/db/transaction_test.go | 2 +- .../internal/db/transactionalcache.go | 0 .../internal/feewindow/feewindow.go | 4 +- .../internal/feewindow/feewindow_test.go | 0 .../internal/ingest/ledgerentry.go | 2 +- .../internal/ingest/mock_db_test.go | 2 +- .../internal/ingest/service.go | 10 ++--- .../internal/ingest/service_test.go | 6 +-- .../internal/integrationtest/archive_test.go | 6 +-- .../internal/integrationtest/cors_test.go | 4 +- .../integrationtest/get_fee_stats_test.go | 4 +- .../get_ledger_entries_test.go | 4 +- .../integrationtest/get_ledgers_test.go | 4 +- .../integrationtest/get_network_test.go | 4 +- .../integrationtest/get_transactions_test.go | 4 +- .../integrationtest/get_version_info_test.go | 6 +-- .../internal/integrationtest/health_test.go | 4 +- .../integrationtest/infrastructure/client.go | 2 +- .../infrastructure/contract.go | 0 .../captive-core-integration-tests.cfg.tmpl | 0 .../infrastructure/docker/core-start.sh | 0 .../docker/docker-compose.rpc.yml | 4 +- .../infrastructure/docker/docker-compose.yml | 0 .../docker/stellar-core-integration-tests.cfg | 0 .../integrationtest/infrastructure/test.go | 8 ++-- .../integrationtest/infrastructure/util.go | 0 .../internal/integrationtest/metrics_test.go | 4 +- .../internal/integrationtest/migrate_test.go | 8 ++-- .../simulate_transaction_test.go | 4 +- .../integrationtest/transaction_test.go | 4 +- .../internal/integrationtest/upgrade_test.go | 4 +- .../internal/jsonrpc.go | 12 +++--- .../ledgerbucketwindow/ledgerbucketwindow.go | 0 .../ledgerbucketwindow_test.go | 0 .../internal/methods/get_events.go | 4 +- .../internal/methods/get_events_test.go | 6 +-- .../internal/methods/get_fee_stats.go | 4 +- .../internal/methods/get_latest_ledger.go | 2 +- .../methods/get_latest_ledger_test.go | 4 +- .../internal/methods/get_ledger_entries.go | 4 +- .../internal/methods/get_ledgers.go | 4 +- .../internal/methods/get_ledgers_test.go | 4 +- .../internal/methods/get_network.go | 2 +- .../internal/methods/get_transaction.go | 10 ++--- .../internal/methods/get_transaction_test.go | 4 +- .../internal/methods/get_transactions.go | 4 +- .../internal/methods/get_transactions_test.go | 2 +- .../internal/methods/get_version_info.go | 6 +-- .../internal/methods/handler.go | 0 .../internal/methods/handler_test.go | 0 .../internal/methods/health.go | 2 +- .../internal/methods/json.go | 4 +- .../internal/methods/send_transaction.go | 14 +++---- .../internal/methods/simulate_transaction.go | 8 ++-- .../methods/simulate_transaction_test.go | 4 +- .../internal/methods/util.go | 2 +- .../internal/methods/util_test.go | 4 +- .../internal/network/backlogQ.go | 0 .../internal/network/backlogQ_test.go | 0 .../network/requestdurationlimiter.go | 2 +- .../network/requestdurationlimiter_test.go | 0 .../internal/network/utils_test.go | 0 .../internal/preflight/pool.go | 4 +- .../internal/preflight/preflight.go | 2 +- .../internal/preflight/preflight_test.go | 4 +- .../internal/util/panicgroup.go | 0 .../internal/util/panicgroup_test.go | 0 .../internal/xdr2json/conversion.go | 0 .../internal/xdr2json/conversion_test.go | 0 .../lib/ffi/Cargo.toml | 0 .../lib/ffi/src/lib.rs | 0 .../lib/preflight.h | 0 .../lib/preflight/Cargo.toml | 2 +- .../lib/preflight/src/lib.rs | 0 .../lib/preflight/src/shared.rs | 0 cmd/{soroban-rpc => stellar-rpc}/lib/shared.h | 0 .../lib/xdr2json.h | 0 .../lib/xdr2json/Cargo.toml | 0 .../lib/xdr2json/src/lib.rs | 0 cmd/{soroban-rpc => stellar-rpc}/main.go | 12 +++--- docs/MONITORING.md | 12 +++--- go.mod | 2 +- scripts/check-dependencies.bash | 8 ++-- 128 files changed, 247 insertions(+), 247 deletions(-) rename .github/workflows/{soroban-rpc.yml => stellar-rpc.yml} (94%) rename cmd/{soroban-rpc => stellar-rpc}/README.md (78%) rename cmd/{soroban-rpc => stellar-rpc}/docker/Dockerfile (92%) rename cmd/{soroban-rpc => stellar-rpc}/docker/Dockerfile.release (91%) rename cmd/{soroban-rpc => stellar-rpc}/docker/Makefile (88%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/flags.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/log_format.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/main.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/main_test.go (95%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/option.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/option_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/options.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/options_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/parse.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/test.soroban.rpc.config (66%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/toml.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/toml_test.go (94%) rename cmd/{soroban-rpc => stellar-rpc}/internal/config/version.go (50%) rename cmd/{soroban-rpc => stellar-rpc}/internal/daemon/daemon.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/daemon/interfaces/interfaces.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/daemon/interfaces/noOpDaemon.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/daemon/metrics.go (96%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/cursor.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/cursor_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/db.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/event.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/event_test.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/ledger.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/ledger_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/ledgerentry.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/ledgerentry_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/migration.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/mocks.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/sqlmigrations/01_init.sql (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/sqlmigrations/02_transactions.sql (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/sqlmigrations/03_events.sql (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/sqlmigrations/04_metadata.sql (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/transaction.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/transaction_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/db/transactionalcache.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/feewindow/feewindow.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/feewindow/feewindow_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/ingest/ledgerentry.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/ingest/mock_db_test.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/ingest/service.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/ingest/service_test.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/archive_test.go (88%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/cors_test.go (91%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/get_fee_stats_test.go (96%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/get_ledger_entries_test.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/get_ledgers_test.go (93%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/get_network_test.go (83%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/get_transactions_test.go (96%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/get_version_info_test.go (80%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/health_test.go (81%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/client.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/contract.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/docker/captive-core-integration-tests.cfg.tmpl (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/docker/core-start.sh (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml (84%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/docker/docker-compose.yml (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/docker/stellar-core-integration-tests.cfg (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/test.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/infrastructure/util.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/metrics_test.go (92%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/migrate_test.go (93%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/simulate_transaction_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/transaction_test.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/integrationtest/upgrade_test.go (91%) rename cmd/{soroban-rpc => stellar-rpc}/internal/jsonrpc.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/ledgerbucketwindow/ledgerbucketwindow.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/ledgerbucketwindow/ledgerbucketwindow_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_events.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_events_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_fee_stats.go (95%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_latest_ledger.go (95%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_latest_ledger_test.go (95%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_ledger_entries.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_ledgers.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_ledgers_test.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_network.go (94%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_transaction.go (94%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_transaction_test.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_transactions.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_transactions_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/get_version_info.go (90%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/handler.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/handler_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/health.go (96%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/json.go (92%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/send_transaction.go (94%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/simulate_transaction.go (98%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/simulate_transaction_test.go (95%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/util.go (91%) rename cmd/{soroban-rpc => stellar-rpc}/internal/methods/util_test.go (95%) rename cmd/{soroban-rpc => stellar-rpc}/internal/network/backlogQ.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/network/backlogQ_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/network/requestdurationlimiter.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/network/requestdurationlimiter_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/network/utils_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/preflight/pool.go (97%) rename cmd/{soroban-rpc => stellar-rpc}/internal/preflight/preflight.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/preflight/preflight_test.go (99%) rename cmd/{soroban-rpc => stellar-rpc}/internal/util/panicgroup.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/util/panicgroup_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/xdr2json/conversion.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/internal/xdr2json/conversion_test.go (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/ffi/Cargo.toml (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/ffi/src/lib.rs (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/preflight.h (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/preflight/Cargo.toml (92%) rename cmd/{soroban-rpc => stellar-rpc}/lib/preflight/src/lib.rs (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/preflight/src/shared.rs (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/shared.h (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/xdr2json.h (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/xdr2json/Cargo.toml (100%) rename cmd/{soroban-rpc => stellar-rpc}/lib/xdr2json/src/lib.rs (100%) rename cmd/{soroban-rpc => stellar-rpc}/main.go (87%) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 6f9910b2..d4008209 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -23,7 +23,7 @@ jobs: # the soroban CLI & RPC source code to compile and run from system test # refers to checked out source of current git hub ref context SYSTEM_TEST_SOROBAN_CLI_REF: https://github.com/stellar/soroban-cli.git\#main - SYSTEM_TEST_SOROBAN_RPC_REF: ${{ github.workspace }}/soroban-rpc + SYSTEM_TEST_SOROBAN_RPC_REF: ${{ github.workspace }}/stellar-rpc # core git ref should be latest commit for stable soroban functionality # the core bin can either be compiled in-line here as part of ci, @@ -75,10 +75,10 @@ jobs: repository: stellar/soroban-tools path: soroban-tools - uses: actions/checkout@v4 - name: checkout soroban-rpc + name: checkout stellar-rpc with: - repository: stellar/soroban-rpc - path: soroban-rpc + repository: stellar/stellar-rpc + path: stellar-rpc - if: ${{ env.SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO != ''}} name: prepare local js-stellar-sdk diff --git a/.github/workflows/required_status_check.yml b/.github/workflows/required_status_check.yml index 0362afb3..f1746891 100644 --- a/.github/workflows/required_status_check.yml +++ b/.github/workflows/required_status_check.yml @@ -15,4 +15,4 @@ jobs: Dependency sanity checker* Go* Rust* - Soroban RPC* + Stellar RPC* diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/stellar-rpc.yml similarity index 94% rename from .github/workflows/soroban-rpc.yml rename to .github/workflows/stellar-rpc.yml index 66b887e0..2906ac30 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/stellar-rpc.yml @@ -1,4 +1,4 @@ -name: Soroban RPC +name: Stellar RPC defaults: run: @@ -32,7 +32,7 @@ jobs: - run: rustup update - uses: stellar/actions/rust-cache@main - run: make build-libs - - run: go test -race -timeout 25m ./cmd/soroban-rpc/... + - run: go test -race -timeout 25m ./cmd/stellar-rpc/... build: name: Build @@ -83,11 +83,11 @@ jobs: env: CARGO_BUILD_TARGET: ${{ matrix.rust_target }} - - name: Build Soroban RPC reproducible build + - name: Build Stellar RPC reproducible build run: | - go build -trimpath -buildvcs=false ./cmd/soroban-rpc - ls -lh soroban-rpc - file soroban-rpc + go build -trimpath -buildvcs=false ./cmd/stellar-rpc + ls -lh stellar-rpc + file stellar-rpc env: CGO_ENABLED: 1 GOARCH: ${{ matrix.go_arch }} @@ -171,6 +171,6 @@ jobs: - uses: stellar/actions/rust-cache@main - run: make build-libs - - name: Run Soroban RPC Integration Tests + - name: Run Stellar RPC Integration Tests run: | - go test -race -timeout 20m ./cmd/soroban-rpc/internal/integrationtest/... + go test -race -timeout 20m ./cmd/stellar-rpc/internal/integrationtest/... diff --git a/.golangci.yml b/.golangci.yml index 8425f3d3..19f730d0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -115,7 +115,7 @@ linters: issues: # Exclude certain checks in test files exclude-rules: - - path: '^(.*_test\.go|cmd/soroban-rpc/internal/integrationtest/infrastructure/.*)$' + - path: '^(.*_test\.go|cmd/stellar-rpc/internal/integrationtest/infrastructure/.*)$' linters: - mnd - gosec diff --git a/CHANGELOG.md b/CHANGELOG.md index 617cb7c3..602ab4db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,12 +5,12 @@ ### Breaking Change - Remove `GetLedgerEntry` endpoint. This endpoint was already deprecated earlier in favor of `GetLedgerEntries` and is completely removed in this release. -## [v21.5.1](https://github.com/stellar/soroban-rpc/compare/v21.5.0...v21.5.1) +## [v21.5.1](https://github.com/stellar/stellar-rpc/compare/v21.5.0...v21.5.1) ### Fixed -* Preserve field omission behavior of `simulateTransaction` ([#291](https://github.com/stellar/soroban-rpc/pull/291)). +* Preserve field omission behavior of `simulateTransaction` ([#291](https://github.com/stellar/stellar-rpc/pull/291)). -## [v21.5.0](https://github.com/stellar/soroban-rpc/compare/v21.4.1...v21.5.0) +## [v21.5.0](https://github.com/stellar/stellar-rpc/compare/v21.4.1...v21.5.0) ### Added @@ -45,24 +45,24 @@ Certain XDR-encoded fields do not have an `Xdr` suffix, but those also have a `* `Json` suffix, and `results.xdr` is now `results.returnValueJson` ### Fixed -* Improve performance of `getVersionInfo` and `getNetwork` ([#198](https://github.com/stellar/soroban-rpc/pull/198)). +* Improve performance of `getVersionInfo` and `getNetwork` ([#198](https://github.com/stellar/stellar-rpc/pull/198)). -## [v21.4.1](https://github.com/stellar/soroban-rpc/compare/v21.4.0...v21.4.1) +## [v21.4.1](https://github.com/stellar/stellar-rpc/compare/v21.4.0...v21.4.1) ### Fixed -* Fix parsing of the `--log-format` parameter ([#252](https://github.com/stellar/soroban-rpc/pull/252)) +* Fix parsing of the `--log-format` parameter ([#252](https://github.com/stellar/stellar-rpc/pull/252)) -## [v21.4.0](https://github.com/stellar/soroban-rpc/compare/v21.2.0...v21.4.0) +## [v21.4.0](https://github.com/stellar/stellar-rpc/compare/v21.2.0...v21.4.0) ### Added -* Transactions will now be stored in a database rather than in memory ([#174](https://github.com/stellar/soroban-rpc/pull/174)). +* Transactions will now be stored in a database rather than in memory ([#174](https://github.com/stellar/stellar-rpc/pull/174)). You can opt-in to longer transaction retention by setting `--transaction-retention-window` / `TRANSACTION_RETENTION_WINDOW` to a higher number of ledgers. This will also retain corresponding number of ledgers in the database. Keep in mind, of course, that this will cause an increase in disk usage for the growing database. -* Unify transaction and event retention windows ([#234](https://github.com/stellar/soroban-rpc/pull/234)). -* There is a new `getTransactions` endpoint with the following API ([#136](https://github.com/stellar/soroban-rpc/pull/136)): +* Unify transaction and event retention windows ([#234](https://github.com/stellar/stellar-rpc/pull/234)). +* There is a new `getTransactions` endpoint with the following API ([#136](https://github.com/stellar/stellar-rpc/pull/136)): ```typescript interface Request { @@ -96,23 +96,23 @@ interface Transaction { ``` ### Fixed -* Logging and typo fixes in ([#238](https://github.com/stellar/soroban-rpc/pull/238)). -* Fix calculation of ledger ranges across endpoints ([#217](https://github.com/stellar/soroban-rpc/pull/217)). +* Logging and typo fixes in ([#238](https://github.com/stellar/stellar-rpc/pull/238)). +* Fix calculation of ledger ranges across endpoints ([#217](https://github.com/stellar/stellar-rpc/pull/217)). -## [v21.2.0](https://github.com/stellar/soroban-rpc/compare/v21.1.0...v21.2.0) +## [v21.2.0](https://github.com/stellar/stellar-rpc/compare/v21.1.0...v21.2.0) ### Added -* Dependencies have been updated (`stellar/go`) to enable `ENABLE_DIAGNOSTICS_FOR_TX_SUBMISSION` by default ([#179](https://github.com/stellar/soroban-rpc/pull/179)). +* Dependencies have been updated (`stellar/go`) to enable `ENABLE_DIAGNOSTICS_FOR_TX_SUBMISSION` by default ([#179](https://github.com/stellar/stellar-rpc/pull/179)). ### Fixed -* The Captive Core path is supplied correctly for TOML generation ([#178](https://github.com/stellar/soroban-rpc/pull/178)). +* The Captive Core path is supplied correctly for TOML generation ([#178](https://github.com/stellar/stellar-rpc/pull/178)). -## [v21.1.0](https://github.com/stellar/soroban-rpc/compare/v21.0.1...v21.1.0) +## [v21.1.0](https://github.com/stellar/stellar-rpc/compare/v21.0.1...v21.1.0) ### Added -* A new `getVersionInfo` RPC endpoint providing versioning info ([#132](https://github.com/stellar/soroban-rpc/pull/132)): +* A new `getVersionInfo` RPC endpoint providing versioning info ([#132](https://github.com/stellar/stellar-rpc/pull/132)): ```typescript interface getVersionInfo { @@ -125,10 +125,10 @@ interface getVersionInfo { ``` ### Fixed -* Deadlock on events ingestion error ([#167](https://github.com/stellar/soroban-rpc/pull/167)). -* Correctly report row iteration errors in `StreamAllLedgers` ([#168](https://github.com/stellar/soroban-rpc/pull/168)). -* Increase default ingestion timeout ([#169](https://github.com/stellar/soroban-rpc/pull/169)). -* Surface an ignored error in `getRawLedgerEntries()` ([#170](https://github.com/stellar/soroban-rpc/pull/170)). +* Deadlock on events ingestion error ([#167](https://github.com/stellar/stellar-rpc/pull/167)). +* Correctly report row iteration errors in `StreamAllLedgers` ([#168](https://github.com/stellar/stellar-rpc/pull/168)). +* Increase default ingestion timeout ([#169](https://github.com/stellar/stellar-rpc/pull/169)). +* Surface an ignored error in `getRawLedgerEntries()` ([#170](https://github.com/stellar/stellar-rpc/pull/170)). # Formatting Guidelines diff --git a/Cargo.toml b/Cargo.toml index 09200616..f8840571 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,9 +1,9 @@ [workspace] resolver = "2" members = [ - "cmd/soroban-rpc/lib/preflight", - "cmd/soroban-rpc/lib/ffi", - "cmd/soroban-rpc/lib/xdr2json" + "cmd/stellar-rpc/lib/preflight", + "cmd/stellar-rpc/lib/ffi", + "cmd/stellar-rpc/lib/xdr2json" ] [workspace.package] diff --git a/Makefile b/Makefile index 632e6165..39502cd1 100644 --- a/Makefile +++ b/Makefile @@ -14,10 +14,10 @@ ifeq ($(strip $(REPOSITORY_VERSION)),) endif REPOSITORY_BRANCH := "$(shell git rev-parse --abbrev-ref HEAD)" BUILD_TIMESTAMP ?= $(shell date '+%Y-%m-%dT%H:%M:%S') -GOLDFLAGS := -X 'github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config.Version=${REPOSITORY_VERSION}' \ - -X 'github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config.CommitHash=${REPOSITORY_COMMIT_HASH}' \ - -X 'github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config.BuildTimestamp=${BUILD_TIMESTAMP}' \ - -X 'github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config.Branch=${REPOSITORY_BRANCH}' +GOLDFLAGS := -X 'github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config.Version=${REPOSITORY_VERSION}' \ + -X 'github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config.CommitHash=${REPOSITORY_COMMIT_HASH}' \ + -X 'github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config.BuildTimestamp=${BUILD_TIMESTAMP}' \ + -X 'github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config.Branch=${REPOSITORY_BRANCH}' # The following works around incompatibility between the rust and the go linkers - @@ -36,7 +36,7 @@ endif # (libpreflight.a is put at target/release-with-panic-unwind/ when not cross compiling) CARGO_BUILD_TARGET ?= $(shell rustc -vV | sed -n 's|host: ||p') -SOROBAN_RPC_BINARY := soroban-rpc +SOROBAN_RPC_BINARY := stellar-rpc STELLAR_RPC_BINARY := stellar-rpc @@ -51,7 +51,7 @@ build: build-libs go build -ldflags="${GOLDFLAGS}" ${MACOS_MIN_VER} ./... build-libs: Cargo.lock - cd cmd/soroban-rpc/lib/preflight && \ + cd cmd/stellar-rpc/lib/preflight && \ cargo build --target $(CARGO_BUILD_TARGET) --profile release-with-panic-unwind && \ cd ../xdr2json && \ cargo build --target $(CARGO_BUILD_TARGET) --profile release-with-panic-unwind @@ -82,17 +82,17 @@ clean: go clean ./... # DEPRECATED - please use build-stellar-rpc instead -# the build-soroban-rpc build target is an optimized build target used by -# https://github.com/stellar/pipelines/blob/master/soroban-rpc/Jenkinsfile-soroban-rpc-package-builder +# the build-stellar-rpc build target is an optimized build target used by +# https://github.com/stellar/pipelines/blob/master/stellar-rpc/Jenkinsfile-stellar-rpc-package-builder # as part of the package building. -build-soroban-rpc: build-libs - go build -ldflags="${GOLDFLAGS}" ${MACOS_MIN_VER} -o ${SOROBAN_RPC_BINARY} -trimpath -v ./cmd/soroban-rpc +build-stellar-rpc: build-libs + go build -ldflags="${GOLDFLAGS}" ${MACOS_MIN_VER} -o ${SOROBAN_RPC_BINARY} -trimpath -v ./cmd/stellar-rpc # the build-stellar-rpc build target is an optimized build target used by -# https://github.com/stellar/pipelines/blob/master/soroban-rpc/Jenkinsfile-soroban-rpc-package-builder +# https://github.com/stellar/pipelines/blob/master/stellar-rpc/Jenkinsfile-stellar-rpc-package-builder # as part of the package building. build-stellar-rpc: build-libs - go build -ldflags="${GOLDFLAGS}" ${MACOS_MIN_VER} -o ${STELLAR_RPC_BINARY} -trimpath -v ./cmd/soroban-rpc + go build -ldflags="${GOLDFLAGS}" ${MACOS_MIN_VER} -o ${STELLAR_RPC_BINARY} -trimpath -v ./cmd/stellar-rpc go-check-branch: @@ -103,4 +103,4 @@ go-check: # PHONY lists all the targets that aren't file names, so that make would skip the timestamp based check. -.PHONY: clean fmt watch test rust-test go-test check rust-check go-check install build build-soroban-rpc build-libs lint lint-changes +.PHONY: clean fmt watch test rust-test go-test check rust-check go-check install build build-stellar-rpc build-libs lint lint-changes diff --git a/README.md b/README.md index 84958cd2..464d775b 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -# soroban-rpc +# stellar-rpc RPC Server for Stellar. -This repo is home to the Soroban RPC, soon to be renamed Stellar RPC. The RPC provides information that the network currently has in its view. It has the ability to send a transaction to the network, and query the network for the status of previously sent transactions, and is meant to be simple, scalable, and familiar to blockchain developers. +This repo is home to the Stellar RPC. The RPC provides information that the network currently has in its view. It has the ability to send a transaction to the network, and query the network for the status of previously sent transactions, and is meant to be simple, scalable, and familiar to blockchain developers. ## RPC Methods -To learn about the RPC methods, please see our [RPC Developer Docs](https://developers.stellar.org/network/soroban-rpc/methods). +To learn about the RPC methods, please see our [RPC Developer Docs](https://developers.stellar.org/network/stellar-rpc/methods). ## To Use an Ecosystem RPCs -To use RPC from an ecosystem provider for futurenet, testnet, or mainnet, please see our list of [Ecosystem RPC Providers](https://developers.stellar.org/network/soroban-rpc/rpc-providers). +To use RPC from an ecosystem provider for futurenet, testnet, or mainnet, please see our list of [Ecosystem RPC Providers](https://developers.stellar.org/network/stellar-rpc/rpc-providers). ## Run Your Own RPC -If you are interested in running your own RPC, please review the [Admin Guide](https://developers.stellar.org/network/soroban-rpc/admin-guide). +If you are interested in running your own RPC, please review the [Admin Guide](https://developers.stellar.org/network/stellar-rpc/admin-guide). ## Latest Release For latest releases, please see -[releases](https://github.com/stellar/soroban-rpc/releases). +[releases](https://github.com/stellar/stellar-rpc/releases). ## Upcoming Features For upcoming features, please see the [project @@ -24,10 +24,10 @@ board](https://github.com/orgs/stellar/projects/37). ## Report Bugs or Request Features To report bugs or request features, please open an issue on the official [RPC -repo](https://github.com/stellar/soroban-rpc). +repo](https://github.com/stellar/stellar-rpc). ## To Contribute Please fork this see `good first issues` on -[here](https://github.com/stellar/soroban-rpc/contribute). +[here](https://github.com/stellar/stellar-rpc/contribute). Developer Docs: https://developers.stellar.org/docs diff --git a/cmd/soroban-rpc/README.md b/cmd/stellar-rpc/README.md similarity index 78% rename from cmd/soroban-rpc/README.md rename to cmd/stellar-rpc/README.md index 1c85dbea..26d2a150 100644 --- a/cmd/soroban-rpc/README.md +++ b/cmd/stellar-rpc/README.md @@ -1,6 +1,6 @@ -# Soroban-RPC +# Stellar-RPC -Soroban-RPC allows you to communicate directly with Soroban via a JSON RPC interface. +Stellar-RPC allows you to communicate directly with Soroban via a JSON RPC interface. For example, you can build an application and have it send a transaction, get ledger and event data or simulate transactions. @@ -11,7 +11,7 @@ For example, you can build an application and have it send a transaction, get le - [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) ## Building Stellar-Core -Soroban-RPC requires an instance of stellar-core binary on the same host. This is referred to as the `Captive Core`. +Stellar-RPC requires an instance of stellar-core binary on the same host. This is referred to as the `Captive Core`. Since, we are building RPC from source, we recommend considering two approaches to get the stellar-core binary: - If saving time is top priority and your development machine is on a linux debian OS, then consider installing the testnet release candidates from the [testing repository.](https://apt.stellar.org/pool/unstable/s/stellar-core/) @@ -28,31 +28,31 @@ testnet release candidates from the [testing repository.](https://apt.stellar.or ``` - Follow the build steps listed in [INSTALL.md](https://github.com/stellar/stellar-core/blob/master/INSTALL.md) file for the instructions on building the local binary -## Building Soroban-RPC -- Similar to stellar-core, we will clone the soroban-rpc repo and checkout the testnet release tag: +## Building Stellar-RPC +- Similar to stellar-core, we will clone the stellar-rpc repo and checkout the testnet release tag: ```bash -git clone https://github.com/stellar/soroban-rpc.git -cd soroban-rpc +git clone https://github.com/stellar/stellar-rpc.git +cd stellar-rpc git fetch --tags git checkout tags/v20.3.3 -b soroban-testnet-release ``` -- Build soroban-rpc target: +- Build stellar-rpc target: ```bash -make build-soroban-rpc +make build-stellar-rpc ``` -This will install and build the required dependencies and generate a `soroban-rpc` binary in the working directory. +This will install and build the required dependencies and generate a `stellar-rpc` binary in the working directory. ## Configuring and Running RPC Server -- Both stellar-core and soroban-rpc require configuration files to run. - - For production, we specifically recommend running Soroban RPC with a TOML configuration file rather than CLI flags. +- Both stellar-core and stellar-rpc require configuration files to run. + - For production, we specifically recommend running Stellar RPC with a TOML configuration file rather than CLI flags. - There is a new subcommand `gen-config-file` which takes all the same arguments as the root command (or no arguments at all), and outputs the resulting config toml file to stdout. ```bash - ./soroban-rpc gen-config-file + ./stellar-rpc gen-config-file ``` - Paste the output to a file and save it as `.toml` file in any directory. - Make sure to update the config values to testnet specific ones. You can refer to [Configuring](https://docs.google.com/document/d/1SIbrFWFgju5RAsi6stDyEtgTa78VEt8f3HhqCLoySx4/edit#heading=h.80d1jdtd7ktj) section in the Runbook for specific config settings. - If everything is set up correctly, then you can run the RPC server with the following command: ```bash -./soroban-rpc --config-path +./stellar-rpc --config-path ``` \ No newline at end of file diff --git a/cmd/soroban-rpc/docker/Dockerfile b/cmd/stellar-rpc/docker/Dockerfile similarity index 92% rename from cmd/soroban-rpc/docker/Dockerfile rename to cmd/stellar-rpc/docker/Dockerfile index a9608256..85ac537c 100644 --- a/cmd/soroban-rpc/docker/Dockerfile +++ b/cmd/stellar-rpc/docker/Dockerfile @@ -1,13 +1,13 @@ FROM golang:1.22-bullseye as build ARG RUST_TOOLCHAIN_VERSION=stable ARG REPOSITORY_VERSION -ARG BINARY_NAME=soroban-rpc +ARG BINARY_NAME=stellar-rpc -WORKDIR /go/src/github.com/stellar/soroban-rpc +WORKDIR /go/src/github.com/stellar/stellar-rpc ADD . ./ -RUN git config --global --add safe.directory "/go/src/github.com/stellar/soroban-rpc" +RUN git config --global --add safe.directory "/go/src/github.com/stellar/stellar-rpc" ENV CARGO_HOME=/rust/.cargo ENV RUSTUP_HOME=/rust/.rust @@ -26,7 +26,7 @@ RUN mv ${BINARY_NAME} /bin/${BINARY_NAME} FROM ubuntu:22.04 ARG STELLAR_CORE_VERSION -ARG BINARY_NAME=soroban-rpc +ARG BINARY_NAME=stellar-rpc ENV STELLAR_CORE_VERSION=${STELLAR_CORE_VERSION:-*} ENV STELLAR_CORE_BINARY_PATH /usr/bin/stellar-core ENV DEBIAN_FRONTEND=noninteractive diff --git a/cmd/soroban-rpc/docker/Dockerfile.release b/cmd/stellar-rpc/docker/Dockerfile.release similarity index 91% rename from cmd/soroban-rpc/docker/Dockerfile.release rename to cmd/stellar-rpc/docker/Dockerfile.release index ca67a03f..e627ae5a 100644 --- a/cmd/soroban-rpc/docker/Dockerfile.release +++ b/cmd/stellar-rpc/docker/Dockerfile.release @@ -14,7 +14,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates echo "deb https://apt.stellar.org focal testing" >/etc/apt/sources.list.d/SDF-testing.list && \ echo "deb https://apt.stellar.org focal unstable" >/etc/apt/sources.list.d/SDF-unstable.list && \ apt-get update && \ - apt-get install -y stellar-core=${STELLAR_CORE_VERSION} stellar-soroban-rpc=${SOROBAN_RPC_VERSION} && \ + apt-get install -y stellar-core=${STELLAR_CORE_VERSION} stellar-stellar-rpc=${SOROBAN_RPC_VERSION} && \ apt-get clean -ENTRYPOINT ["/usr/bin/stellar-soroban-rpc"] +ENTRYPOINT ["/usr/bin/stellar-stellar-rpc"] diff --git a/cmd/soroban-rpc/docker/Makefile b/cmd/stellar-rpc/docker/Makefile similarity index 88% rename from cmd/soroban-rpc/docker/Makefile rename to cmd/stellar-rpc/docker/Makefile index f9f6b4b0..c461792c 100644 --- a/cmd/soroban-rpc/docker/Makefile +++ b/cmd/stellar-rpc/docker/Makefile @@ -4,12 +4,12 @@ SUDO := $(shell docker version >/dev/null 2>&1 || echo "sudo") BUILD_DATE := $(shell date -u +%FT%TZ) # Extract latest release semver from GitHub -SOROBAN_RPC_LATEST_RELEASE := $(shell curl -sS https://api.github.com/repos/stellar/soroban-rpc/releases/latest|jq -r ".tag_name"| tr -d "v" ) +SOROBAN_RPC_LATEST_RELEASE := $(shell curl -sS https://api.github.com/repos/stellar/stellar-rpc/releases/latest|jq -r ".tag_name"| tr -d "v" ) # If deb version was provided via the SOROBAN_RPC_VERSION variable use it. # If not get latest deb build matching release from GitHub ifndef SOROBAN_RPC_VERSION - SOROBAN_RPC_VERSION_PACKAGE_VERSION := $(shell curl -sS https://apt.stellar.org/dists/focal/unstable/binary-amd64/Packages|grep -A 18 stellar-soroban-rpc|grep Version|grep $(SOROBAN_RPC_LATEST_RELEASE)|head -1|cut -d' ' -f2 ) + SOROBAN_RPC_VERSION_PACKAGE_VERSION := $(shell curl -sS https://apt.stellar.org/dists/focal/unstable/binary-amd64/Packages|grep -A 18 stellar-stellar-rpc|grep Version|grep $(SOROBAN_RPC_LATEST_RELEASE)|head -1|cut -d' ' -f2 ) else SOROBAN_RPC_VERSION_PACKAGE_VERSION := $(SOROBAN_RPC_VERSION) endif @@ -23,14 +23,14 @@ ifndef STELLAR_CORE_VERSION endif # Set default value for BINARY_NAME if not provided -BINARY_NAME ?= soroban-rpc +BINARY_NAME ?= stellar-rpc ifndef TAG # Set the TAG based on the value of BINARY_NAME ifeq ($(BINARY_NAME),stellar-rpc) TAG := stellar/stellar-rpc:$(SOROBAN_RPC_VERSION_PACKAGE_VERSION) else - TAG := stellar/stellar-soroban-rpc:$(SOROBAN_RPC_VERSION_PACKAGE_VERSION) + TAG := stellar/stellar-stellar-rpc:$(SOROBAN_RPC_VERSION_PACKAGE_VERSION) endif endif # TAG diff --git a/cmd/soroban-rpc/internal/config/flags.go b/cmd/stellar-rpc/internal/config/flags.go similarity index 100% rename from cmd/soroban-rpc/internal/config/flags.go rename to cmd/stellar-rpc/internal/config/flags.go diff --git a/cmd/soroban-rpc/internal/config/log_format.go b/cmd/stellar-rpc/internal/config/log_format.go similarity index 100% rename from cmd/soroban-rpc/internal/config/log_format.go rename to cmd/stellar-rpc/internal/config/log_format.go diff --git a/cmd/soroban-rpc/internal/config/main.go b/cmd/stellar-rpc/internal/config/main.go similarity index 98% rename from cmd/soroban-rpc/internal/config/main.go rename to cmd/stellar-rpc/internal/config/main.go index f0a19522..710968f3 100644 --- a/cmd/soroban-rpc/internal/config/main.go +++ b/cmd/stellar-rpc/internal/config/main.go @@ -8,7 +8,7 @@ import ( "github.com/spf13/pflag" ) -// Config represents the configuration of a soroban-rpc server +// Config represents the configuration of a stellar-rpc server type Config struct { ConfigPath string @@ -129,7 +129,7 @@ func (cfg *Config) loadDefaults() error { } } } - cfg.HistoryArchiveUserAgent = "soroban-rpc/" + Version + cfg.HistoryArchiveUserAgent = "stellar-rpc/" + Version return nil } diff --git a/cmd/soroban-rpc/internal/config/main_test.go b/cmd/stellar-rpc/internal/config/main_test.go similarity index 95% rename from cmd/soroban-rpc/internal/config/main_test.go rename to cmd/stellar-rpc/internal/config/main_test.go index a4af86ad..7b35c522 100644 --- a/cmd/soroban-rpc/internal/config/main_test.go +++ b/cmd/stellar-rpc/internal/config/main_test.go @@ -34,7 +34,7 @@ func TestLoadConfigPathPrecedence(t *testing.T) { })) require.NoError(t, cfg.Validate()) - assert.Equal(t, "/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg", cfg.CaptiveCoreConfigPath, + assert.Equal(t, "/opt/stellar/stellar-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, @@ -56,7 +56,7 @@ func TestConfigLoadDefaults(t *testing.T) { func TestConfigExtendedUserAgent(t *testing.T) { var cfg Config require.NoError(t, cfg.loadDefaults()) - assert.Equal(t, "soroban-rpc/0.0.0/123", cfg.ExtendedUserAgent("123")) + assert.Equal(t, "stellar-rpc/0.0.0/123", cfg.ExtendedUserAgent("123")) } func TestConfigLoadFlagsDefaultValuesOverrideExisting(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/config/option.go b/cmd/stellar-rpc/internal/config/option.go similarity index 100% rename from cmd/soroban-rpc/internal/config/option.go rename to cmd/stellar-rpc/internal/config/option.go diff --git a/cmd/soroban-rpc/internal/config/option_test.go b/cmd/stellar-rpc/internal/config/option_test.go similarity index 100% rename from cmd/soroban-rpc/internal/config/option_test.go rename to cmd/stellar-rpc/internal/config/option_test.go diff --git a/cmd/soroban-rpc/internal/config/options.go b/cmd/stellar-rpc/internal/config/options.go similarity index 100% rename from cmd/soroban-rpc/internal/config/options.go rename to cmd/stellar-rpc/internal/config/options.go diff --git a/cmd/soroban-rpc/internal/config/options_test.go b/cmd/stellar-rpc/internal/config/options_test.go similarity index 100% rename from cmd/soroban-rpc/internal/config/options_test.go rename to cmd/stellar-rpc/internal/config/options_test.go diff --git a/cmd/soroban-rpc/internal/config/parse.go b/cmd/stellar-rpc/internal/config/parse.go similarity index 100% rename from cmd/soroban-rpc/internal/config/parse.go rename to cmd/stellar-rpc/internal/config/parse.go diff --git a/cmd/soroban-rpc/internal/config/test.soroban.rpc.config b/cmd/stellar-rpc/internal/config/test.soroban.rpc.config similarity index 66% rename from cmd/soroban-rpc/internal/config/test.soroban.rpc.config rename to cmd/stellar-rpc/internal/config/test.soroban.rpc.config index c28a9c17..22e5475c 100644 --- a/cmd/soroban-rpc/internal/config/test.soroban.rpc.config +++ b/cmd/stellar-rpc/internal/config/test.soroban.rpc.config @@ -2,10 +2,10 @@ ENDPOINT="localhost:8003" FRIENDBOT_URL="http://localhost:8000/friendbot" NETWORK_PASSPHRASE="Standalone Network ; February 2017" STELLAR_CORE_URL="http://localhost:11626" -CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/soroban-rpc/etc/stellar-captive-core.cfg" -CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/soroban-rpc/captive-core" +CAPTIVE_CORE_CONFIG_PATH="/opt/stellar/stellar-rpc/etc/stellar-captive-core.cfg" +CAPTIVE_CORE_STORAGE_PATH="/opt/stellar/stellar-rpc/captive-core" STELLAR_CORE_BINARY_PATH="/usr/bin/stellar-core" HISTORY_ARCHIVE_URLS=["http://localhost:1570"] -DB_PATH="/opt/stellar/soroban-rpc/rpc_db.sqlite" +DB_PATH="/opt/stellar/stellar-rpc/rpc_db.sqlite" STELLAR_CAPTIVE_CORE_HTTP_PORT=0 CHECKPOINT_FREQUENCY=64 diff --git a/cmd/soroban-rpc/internal/config/toml.go b/cmd/stellar-rpc/internal/config/toml.go similarity index 100% rename from cmd/soroban-rpc/internal/config/toml.go rename to cmd/stellar-rpc/internal/config/toml.go diff --git a/cmd/soroban-rpc/internal/config/toml_test.go b/cmd/stellar-rpc/internal/config/toml_test.go similarity index 94% rename from cmd/soroban-rpc/internal/config/toml_test.go rename to cmd/stellar-rpc/internal/config/toml_test.go index 2e71fd87..16d8c2d8 100644 --- a/cmd/soroban-rpc/internal/config/toml_test.go +++ b/cmd/stellar-rpc/internal/config/toml_test.go @@ -20,8 +20,8 @@ NETWORK_PASSPHRASE = "Test SDF Future Network ; October 2022" # testing comments work ok STELLAR_CORE_BINARY_PATH = "/usr/bin/stellar-core" -CAPTIVE_CORE_STORAGE_PATH = "/etc/stellar/soroban-rpc" -CAPTIVE_CORE_CONFIG_PATH = "/etc/stellar/soroban-rpc/captive-core.cfg" +CAPTIVE_CORE_STORAGE_PATH = "/etc/stellar/stellar-rpc" +CAPTIVE_CORE_CONFIG_PATH = "/etc/stellar/stellar-rpc/captive-core.cfg" ` func TestBasicTomlReading(t *testing.T) { @@ -31,8 +31,8 @@ func TestBasicTomlReading(t *testing.T) { // Check the fields got read correctly assert.Equal(t, []string{"http://history-futurenet.stellar.org"}, cfg.HistoryArchiveURLs) assert.Equal(t, network.FutureNetworkPassphrase, cfg.NetworkPassphrase) - assert.Equal(t, "/etc/stellar/soroban-rpc", cfg.CaptiveCoreStoragePath) - assert.Equal(t, "/etc/stellar/soroban-rpc/captive-core.cfg", cfg.CaptiveCoreConfigPath) + assert.Equal(t, "/etc/stellar/stellar-rpc", cfg.CaptiveCoreStoragePath) + assert.Equal(t, "/etc/stellar/stellar-rpc/captive-core.cfg", cfg.CaptiveCoreConfigPath) } func TestBasicTomlReadingStrictMode(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/config/version.go b/cmd/stellar-rpc/internal/config/version.go similarity index 50% rename from cmd/soroban-rpc/internal/config/version.go rename to cmd/stellar-rpc/internal/config/version.go index 3e203dde..2070a6eb 100644 --- a/cmd/soroban-rpc/internal/config/version.go +++ b/cmd/stellar-rpc/internal/config/version.go @@ -2,15 +2,15 @@ package config var ( - // Version is the soroban-rpc version number, which is injected during build time. + // Version is the stellar-rpc version number, which is injected during build time. Version = "0.0.0" - // CommitHash is the soroban-rpc git commit hash, which is injected during build time. + // CommitHash is the stellar-rpc git commit hash, which is injected during build time. CommitHash = "" - // BuildTimestamp is the timestamp at which the soroban-rpc was built, injected during build time. + // BuildTimestamp is the timestamp at which the stellar-rpc was built, injected during build time. BuildTimestamp = "" - // Branch is the git branch from which the soroban-rpc was built, injected during build time. + // Branch is the git branch from which the stellar-rpc was built, injected during build time. Branch = "" ) diff --git a/cmd/soroban-rpc/internal/daemon/daemon.go b/cmd/stellar-rpc/internal/daemon/daemon.go similarity index 97% rename from cmd/soroban-rpc/internal/daemon/daemon.go rename to cmd/stellar-rpc/internal/daemon/daemon.go index 67110369..e087c47c 100644 --- a/cmd/soroban-rpc/internal/daemon/daemon.go +++ b/cmd/stellar-rpc/internal/daemon/daemon.go @@ -25,13 +25,13 @@ import ( "github.com/stellar/go/support/storage" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/feewindow" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ingest" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/preflight" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/util" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/feewindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ingest" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/preflight" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/util" ) const ( @@ -184,7 +184,7 @@ func setupLogger(cfg *config.Config, logger *supportlog.Entry) *supportlog.Entry logger.WithFields(supportlog.F{ "version": config.Version, "commit": config.CommitHash, - }).Info("starting Soroban RPC") + }).Info("starting Stellar RPC") return logger } diff --git a/cmd/soroban-rpc/internal/daemon/interfaces/interfaces.go b/cmd/stellar-rpc/internal/daemon/interfaces/interfaces.go similarity index 100% rename from cmd/soroban-rpc/internal/daemon/interfaces/interfaces.go rename to cmd/stellar-rpc/internal/daemon/interfaces/interfaces.go diff --git a/cmd/soroban-rpc/internal/daemon/interfaces/noOpDaemon.go b/cmd/stellar-rpc/internal/daemon/interfaces/noOpDaemon.go similarity index 100% rename from cmd/soroban-rpc/internal/daemon/interfaces/noOpDaemon.go rename to cmd/stellar-rpc/internal/daemon/interfaces/noOpDaemon.go diff --git a/cmd/soroban-rpc/internal/daemon/metrics.go b/cmd/stellar-rpc/internal/daemon/metrics.go similarity index 96% rename from cmd/soroban-rpc/internal/daemon/metrics.go rename to cmd/stellar-rpc/internal/daemon/metrics.go index 795ad12b..c7d9dd6d 100644 --- a/cmd/soroban-rpc/internal/daemon/metrics.go +++ b/cmd/stellar-rpc/internal/daemon/metrics.go @@ -15,12 +15,12 @@ import ( "github.com/stellar/go/support/logmetrics" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" ) func (d *Daemon) registerMetrics() { - // LogMetricsHook is a metric which counts log lines emitted by soroban rpc + // LogMetricsHook is a metric which counts log lines emitted by stellar rpc logMetricsHook := logmetrics.New(prometheusNamespace) d.logger.AddHook(logMetricsHook) for _, counter := range logMetricsHook { diff --git a/cmd/soroban-rpc/internal/db/cursor.go b/cmd/stellar-rpc/internal/db/cursor.go similarity index 100% rename from cmd/soroban-rpc/internal/db/cursor.go rename to cmd/stellar-rpc/internal/db/cursor.go diff --git a/cmd/soroban-rpc/internal/db/cursor_test.go b/cmd/stellar-rpc/internal/db/cursor_test.go similarity index 100% rename from cmd/soroban-rpc/internal/db/cursor_test.go rename to cmd/stellar-rpc/internal/db/cursor_test.go diff --git a/cmd/soroban-rpc/internal/db/db.go b/cmd/stellar-rpc/internal/db/db.go similarity index 99% rename from cmd/soroban-rpc/internal/db/db.go rename to cmd/stellar-rpc/internal/db/db.go index 63b7af59..8cd1fa25 100644 --- a/cmd/soroban-rpc/internal/db/db.go +++ b/cmd/stellar-rpc/internal/db/db.go @@ -19,7 +19,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" ) //go:embed sqlmigrations/*.sql diff --git a/cmd/soroban-rpc/internal/db/event.go b/cmd/stellar-rpc/internal/db/event.go similarity index 100% rename from cmd/soroban-rpc/internal/db/event.go rename to cmd/stellar-rpc/internal/db/event.go diff --git a/cmd/soroban-rpc/internal/db/event_test.go b/cmd/stellar-rpc/internal/db/event_test.go similarity index 98% rename from cmd/soroban-rpc/internal/db/event_test.go rename to cmd/stellar-rpc/internal/db/event_test.go index b6d3480e..f62c2fa6 100644 --- a/cmd/soroban-rpc/internal/db/event_test.go +++ b/cmd/stellar-rpc/internal/db/event_test.go @@ -13,7 +13,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" ) func transactionMetaWithEvents(events ...xdr.ContractEvent) xdr.TransactionMeta { diff --git a/cmd/soroban-rpc/internal/db/ledger.go b/cmd/stellar-rpc/internal/db/ledger.go similarity index 99% rename from cmd/soroban-rpc/internal/db/ledger.go rename to cmd/stellar-rpc/internal/db/ledger.go index 730a2da6..762309ca 100644 --- a/cmd/soroban-rpc/internal/db/ledger.go +++ b/cmd/stellar-rpc/internal/db/ledger.go @@ -10,7 +10,7 @@ import ( "github.com/stellar/go/support/db" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) const ( diff --git a/cmd/soroban-rpc/internal/db/ledger_test.go b/cmd/stellar-rpc/internal/db/ledger_test.go similarity index 99% rename from cmd/soroban-rpc/internal/db/ledger_test.go rename to cmd/stellar-rpc/internal/db/ledger_test.go index d2fc7705..ad6e0d3e 100644 --- a/cmd/soroban-rpc/internal/db/ledger_test.go +++ b/cmd/stellar-rpc/internal/db/ledger_test.go @@ -12,7 +12,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" ) var ( diff --git a/cmd/soroban-rpc/internal/db/ledgerentry.go b/cmd/stellar-rpc/internal/db/ledgerentry.go similarity index 100% rename from cmd/soroban-rpc/internal/db/ledgerentry.go rename to cmd/stellar-rpc/internal/db/ledgerentry.go diff --git a/cmd/soroban-rpc/internal/db/ledgerentry_test.go b/cmd/stellar-rpc/internal/db/ledgerentry_test.go similarity index 99% rename from cmd/soroban-rpc/internal/db/ledgerentry_test.go rename to cmd/stellar-rpc/internal/db/ledgerentry_test.go index 0bd97cbc..c7012f5a 100644 --- a/cmd/soroban-rpc/internal/db/ledgerentry_test.go +++ b/cmd/stellar-rpc/internal/db/ledgerentry_test.go @@ -15,7 +15,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" ) func getLedgerEntryAndLatestLedgerSequenceWithErr(db *DB, key xdr.LedgerKey) (bool, xdr.LedgerEntry, diff --git a/cmd/soroban-rpc/internal/db/migration.go b/cmd/stellar-rpc/internal/db/migration.go similarity index 100% rename from cmd/soroban-rpc/internal/db/migration.go rename to cmd/stellar-rpc/internal/db/migration.go diff --git a/cmd/soroban-rpc/internal/db/mocks.go b/cmd/stellar-rpc/internal/db/mocks.go similarity index 97% rename from cmd/soroban-rpc/internal/db/mocks.go rename to cmd/stellar-rpc/internal/db/mocks.go index 4868ced4..11a2dce4 100644 --- a/cmd/soroban-rpc/internal/db/mocks.go +++ b/cmd/stellar-rpc/internal/db/mocks.go @@ -10,7 +10,7 @@ import ( "github.com/stellar/go/ingest" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) type MockTransactionHandler struct { diff --git a/cmd/soroban-rpc/internal/db/sqlmigrations/01_init.sql b/cmd/stellar-rpc/internal/db/sqlmigrations/01_init.sql similarity index 100% rename from cmd/soroban-rpc/internal/db/sqlmigrations/01_init.sql rename to cmd/stellar-rpc/internal/db/sqlmigrations/01_init.sql diff --git a/cmd/soroban-rpc/internal/db/sqlmigrations/02_transactions.sql b/cmd/stellar-rpc/internal/db/sqlmigrations/02_transactions.sql similarity index 100% rename from cmd/soroban-rpc/internal/db/sqlmigrations/02_transactions.sql rename to cmd/stellar-rpc/internal/db/sqlmigrations/02_transactions.sql diff --git a/cmd/soroban-rpc/internal/db/sqlmigrations/03_events.sql b/cmd/stellar-rpc/internal/db/sqlmigrations/03_events.sql similarity index 100% rename from cmd/soroban-rpc/internal/db/sqlmigrations/03_events.sql rename to cmd/stellar-rpc/internal/db/sqlmigrations/03_events.sql diff --git a/cmd/soroban-rpc/internal/db/sqlmigrations/04_metadata.sql b/cmd/stellar-rpc/internal/db/sqlmigrations/04_metadata.sql similarity index 100% rename from cmd/soroban-rpc/internal/db/sqlmigrations/04_metadata.sql rename to cmd/stellar-rpc/internal/db/sqlmigrations/04_metadata.sql diff --git a/cmd/soroban-rpc/internal/db/transaction.go b/cmd/stellar-rpc/internal/db/transaction.go similarity index 99% rename from cmd/soroban-rpc/internal/db/transaction.go rename to cmd/stellar-rpc/internal/db/transaction.go index ef2d5cbf..b869d551 100644 --- a/cmd/soroban-rpc/internal/db/transaction.go +++ b/cmd/stellar-rpc/internal/db/transaction.go @@ -15,7 +15,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) const ( diff --git a/cmd/soroban-rpc/internal/db/transaction_test.go b/cmd/stellar-rpc/internal/db/transaction_test.go similarity index 99% rename from cmd/soroban-rpc/internal/db/transaction_test.go rename to cmd/stellar-rpc/internal/db/transaction_test.go index 8f71a1a0..4400c98c 100644 --- a/cmd/soroban-rpc/internal/db/transaction_test.go +++ b/cmd/stellar-rpc/internal/db/transaction_test.go @@ -14,7 +14,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" ) func TestTransactionNotFound(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/db/transactionalcache.go b/cmd/stellar-rpc/internal/db/transactionalcache.go similarity index 100% rename from cmd/soroban-rpc/internal/db/transactionalcache.go rename to cmd/stellar-rpc/internal/db/transactionalcache.go diff --git a/cmd/soroban-rpc/internal/feewindow/feewindow.go b/cmd/stellar-rpc/internal/feewindow/feewindow.go similarity index 97% rename from cmd/soroban-rpc/internal/feewindow/feewindow.go rename to cmd/stellar-rpc/internal/feewindow/feewindow.go index 24256935..914d01a6 100644 --- a/cmd/soroban-rpc/internal/feewindow/feewindow.go +++ b/cmd/stellar-rpc/internal/feewindow/feewindow.go @@ -11,8 +11,8 @@ import ( "github.com/stellar/go/ingest" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) type FeeDistribution struct { diff --git a/cmd/soroban-rpc/internal/feewindow/feewindow_test.go b/cmd/stellar-rpc/internal/feewindow/feewindow_test.go similarity index 100% rename from cmd/soroban-rpc/internal/feewindow/feewindow_test.go rename to cmd/stellar-rpc/internal/feewindow/feewindow_test.go diff --git a/cmd/soroban-rpc/internal/ingest/ledgerentry.go b/cmd/stellar-rpc/internal/ingest/ledgerentry.go similarity index 97% rename from cmd/soroban-rpc/internal/ingest/ledgerentry.go rename to cmd/stellar-rpc/internal/ingest/ledgerentry.go index 49b1406d..3fe280b8 100644 --- a/cmd/soroban-rpc/internal/ingest/ledgerentry.go +++ b/cmd/stellar-rpc/internal/ingest/ledgerentry.go @@ -14,7 +14,7 @@ import ( "github.com/stellar/go/ingest" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) func (s *Service) ingestLedgerEntryChanges(ctx context.Context, reader ingest.ChangeReader, diff --git a/cmd/soroban-rpc/internal/ingest/mock_db_test.go b/cmd/stellar-rpc/internal/ingest/mock_db_test.go similarity index 97% rename from cmd/soroban-rpc/internal/ingest/mock_db_test.go rename to cmd/stellar-rpc/internal/ingest/mock_db_test.go index 981deafc..460b378a 100644 --- a/cmd/soroban-rpc/internal/ingest/mock_db_test.go +++ b/cmd/stellar-rpc/internal/ingest/mock_db_test.go @@ -8,7 +8,7 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) var ( diff --git a/cmd/soroban-rpc/internal/ingest/service.go b/cmd/stellar-rpc/internal/ingest/service.go similarity index 97% rename from cmd/soroban-rpc/internal/ingest/service.go rename to cmd/stellar-rpc/internal/ingest/service.go index 92eb74d1..7344e9a3 100644 --- a/cmd/soroban-rpc/internal/ingest/service.go +++ b/cmd/stellar-rpc/internal/ingest/service.go @@ -16,10 +16,10 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/feewindow" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/util" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/feewindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/util" ) const ( @@ -63,7 +63,7 @@ func newService(cfg Config) *Service { Help: "sequence number of the latest ledger ingested by this ingesting instance", }) - // ledgerStatsMetric is a metric which measures statistics on all ledger entries ingested by soroban rpc + // ledgerStatsMetric is a metric which measures statistics on all ledger entries ingested by stellar rpc ledgerStatsMetric := prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: cfg.Daemon.MetricsNamespace(), Subsystem: "ingest", Name: "ledger_stats_total", diff --git a/cmd/soroban-rpc/internal/ingest/service_test.go b/cmd/stellar-rpc/internal/ingest/service_test.go similarity index 98% rename from cmd/soroban-rpc/internal/ingest/service_test.go rename to cmd/stellar-rpc/internal/ingest/service_test.go index 566616a2..f6b81dfd 100644 --- a/cmd/soroban-rpc/internal/ingest/service_test.go +++ b/cmd/stellar-rpc/internal/ingest/service_test.go @@ -16,9 +16,9 @@ import ( supportlog "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/feewindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/feewindow" ) type ErrorReadWriter struct{} diff --git a/cmd/soroban-rpc/internal/integrationtest/archive_test.go b/cmd/stellar-rpc/internal/integrationtest/archive_test.go similarity index 88% rename from cmd/soroban-rpc/internal/integrationtest/archive_test.go rename to cmd/stellar-rpc/internal/integrationtest/archive_test.go index 57179284..0070d74a 100644 --- a/cmd/soroban-rpc/internal/integrationtest/archive_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/archive_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" ) func TestArchiveUserAgent(t *testing.T) { @@ -48,8 +48,8 @@ func TestArchiveUserAgent(t *testing.T) { require.Eventually(t, func() bool { - _, ok1 := userAgents.Load("soroban-rpc/0.0.0") - _, ok2 := userAgents.Load("soroban-rpc/0.0.0/captivecore") + _, ok1 := userAgents.Load("stellar-rpc/0.0.0") + _, ok2 := userAgents.Load("stellar-rpc/0.0.0/captivecore") return ok1 && ok2 }, 5*time.Second, diff --git a/cmd/soroban-rpc/internal/integrationtest/cors_test.go b/cmd/stellar-rpc/internal/integrationtest/cors_test.go similarity index 91% rename from cmd/soroban-rpc/internal/integrationtest/cors_test.go rename to cmd/stellar-rpc/internal/integrationtest/cors_test.go index d2226b19..d6fe1c2c 100644 --- a/cmd/soroban-rpc/internal/integrationtest/cors_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/cors_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" ) // TestCORS ensures that we receive the correct CORS headers as a response to an HTTP request. -// Specifically, when we include an Origin header in the request, a soroban-rpc should response +// Specifically, when we include an Origin header in the request, a stellar-rpc should response // with a corresponding Access-Control-Allow-Origin. func TestCORS(t *testing.T) { test := infrastructure.NewTest(t, nil) diff --git a/cmd/soroban-rpc/internal/integrationtest/get_fee_stats_test.go b/cmd/stellar-rpc/internal/integrationtest/get_fee_stats_test.go similarity index 96% rename from cmd/soroban-rpc/internal/integrationtest/get_fee_stats_test.go rename to cmd/stellar-rpc/internal/integrationtest/get_fee_stats_test.go index 68fc2486..c17019f2 100644 --- a/cmd/soroban-rpc/internal/integrationtest/get_fee_stats_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/get_fee_stats_test.go @@ -10,8 +10,8 @@ import ( "github.com/stellar/go/txnbuild" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func TestGetFeeStats(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/get_ledger_entries_test.go b/cmd/stellar-rpc/internal/integrationtest/get_ledger_entries_test.go similarity index 97% rename from cmd/soroban-rpc/internal/integrationtest/get_ledger_entries_test.go rename to cmd/stellar-rpc/internal/integrationtest/get_ledger_entries_test.go index 71a25b22..5ef59646 100644 --- a/cmd/soroban-rpc/internal/integrationtest/get_ledger_entries_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/get_ledger_entries_test.go @@ -10,8 +10,8 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func TestGetLedgerEntriesNotFound(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/get_ledgers_test.go b/cmd/stellar-rpc/internal/integrationtest/get_ledgers_test.go similarity index 93% rename from cmd/soroban-rpc/internal/integrationtest/get_ledgers_test.go rename to cmd/stellar-rpc/internal/integrationtest/get_ledgers_test.go index d8d0aa2b..200b0cd9 100644 --- a/cmd/soroban-rpc/internal/integrationtest/get_ledgers_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/get_ledgers_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func TestGetLedgers(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/get_network_test.go b/cmd/stellar-rpc/internal/integrationtest/get_network_test.go similarity index 83% rename from cmd/soroban-rpc/internal/integrationtest/get_network_test.go rename to cmd/stellar-rpc/internal/integrationtest/get_network_test.go index b8623973..633ad3ab 100644 --- a/cmd/soroban-rpc/internal/integrationtest/get_network_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/get_network_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func TestGetNetworkSucceeds(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/get_transactions_test.go b/cmd/stellar-rpc/internal/integrationtest/get_transactions_test.go similarity index 96% rename from cmd/soroban-rpc/internal/integrationtest/get_transactions_test.go rename to cmd/stellar-rpc/internal/integrationtest/get_transactions_test.go index 6c66efb0..86f28e5e 100644 --- a/cmd/soroban-rpc/internal/integrationtest/get_transactions_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/get_transactions_test.go @@ -9,8 +9,8 @@ import ( "github.com/stellar/go/keypair" "github.com/stellar/go/txnbuild" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) // buildSetOptionsTxParams constructs the parameters necessary for creating a transaction from the given account. diff --git a/cmd/soroban-rpc/internal/integrationtest/get_version_info_test.go b/cmd/stellar-rpc/internal/integrationtest/get_version_info_test.go similarity index 80% rename from cmd/soroban-rpc/internal/integrationtest/get_version_info_test.go rename to cmd/stellar-rpc/internal/integrationtest/get_version_info_test.go index 363f0115..3ba24694 100644 --- a/cmd/soroban-rpc/internal/integrationtest/get_version_info_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/get_version_info_test.go @@ -6,9 +6,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func init() { diff --git a/cmd/soroban-rpc/internal/integrationtest/health_test.go b/cmd/stellar-rpc/internal/integrationtest/health_test.go similarity index 81% rename from cmd/soroban-rpc/internal/integrationtest/health_test.go rename to cmd/stellar-rpc/internal/integrationtest/health_test.go index c06639cd..daae79e0 100644 --- a/cmd/soroban-rpc/internal/integrationtest/health_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/health_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" ) func TestHealth(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/client.go b/cmd/stellar-rpc/internal/integrationtest/infrastructure/client.go similarity index 98% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/client.go rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/client.go index 7621286a..b787ddc8 100644 --- a/cmd/soroban-rpc/internal/integrationtest/infrastructure/client.go +++ b/cmd/stellar-rpc/internal/integrationtest/infrastructure/client.go @@ -15,7 +15,7 @@ import ( "github.com/stellar/go/txnbuild" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) // Client is a jrpc2 client which tolerates errors diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/contract.go b/cmd/stellar-rpc/internal/integrationtest/infrastructure/contract.go similarity index 100% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/contract.go rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/contract.go diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/captive-core-integration-tests.cfg.tmpl b/cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/captive-core-integration-tests.cfg.tmpl similarity index 100% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/captive-core-integration-tests.cfg.tmpl rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/captive-core-integration-tests.cfg.tmpl diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/core-start.sh b/cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/core-start.sh similarity index 100% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/core-start.sh rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/core-start.sh diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml b/cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml similarity index 84% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml index 6a0992d4..e9b3c7a2 100644 --- a/cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml +++ b/cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/docker-compose.rpc.yml @@ -11,10 +11,10 @@ services: - "127.0.0.1::8000" # Admin HTTP - "127.0.0.1::8080" - command: --config-path /soroban-rpc.config + command: --config-path /stellar-rpc.config volumes: - ${RPC_CONFIG_MOUNT_DIR}/captive-core-integration-tests.cfg:/stellar-core.cfg - - ${RPC_CONFIG_MOUNT_DIR}/soroban-rpc.config:/soroban-rpc.config + - ${RPC_CONFIG_MOUNT_DIR}/stellar-rpc.config:/stellar-rpc.config - ${RPC_SQLITE_MOUNT_DIR}:/db/ # Needed so that the sql database files created in the container # have the same uid and gid as in the host diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/docker-compose.yml b/cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/docker-compose.yml similarity index 100% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/docker-compose.yml rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/docker-compose.yml diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/stellar-core-integration-tests.cfg b/cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/stellar-core-integration-tests.cfg similarity index 100% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/docker/stellar-core-integration-tests.cfg rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/docker/stellar-core-integration-tests.cfg diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go b/cmd/stellar-rpc/internal/integrationtest/infrastructure/test.go similarity index 98% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/test.go index a8c4aa58..9b543f71 100644 --- a/cmd/soroban-rpc/internal/integrationtest/infrastructure/test.go +++ b/cmd/stellar-rpc/internal/integrationtest/infrastructure/test.go @@ -28,9 +28,9 @@ import ( "github.com/stellar/go/txnbuild" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) const ( @@ -392,7 +392,7 @@ func (i *Test) generateRPCConfigFile(rpcConfig rpcConfig) { for k, v := range rpcConfig.toMap() { cfgFileContents += fmt.Sprintf("%s=%q\n", k, v) } - err := os.WriteFile(filepath.Join(i.rpcConfigFilesDir, "soroban-rpc.config"), []byte(cfgFileContents), 0o666) + err := os.WriteFile(filepath.Join(i.rpcConfigFilesDir, "stellar-rpc.config"), []byte(cfgFileContents), 0o666) require.NoError(i.t, err) } diff --git a/cmd/soroban-rpc/internal/integrationtest/infrastructure/util.go b/cmd/stellar-rpc/internal/integrationtest/infrastructure/util.go similarity index 100% rename from cmd/soroban-rpc/internal/integrationtest/infrastructure/util.go rename to cmd/stellar-rpc/internal/integrationtest/infrastructure/util.go diff --git a/cmd/soroban-rpc/internal/integrationtest/metrics_test.go b/cmd/stellar-rpc/internal/integrationtest/metrics_test.go similarity index 92% rename from cmd/soroban-rpc/internal/integrationtest/metrics_test.go rename to cmd/stellar-rpc/internal/integrationtest/metrics_test.go index 59c148ab..4857c3f3 100644 --- a/cmd/soroban-rpc/internal/integrationtest/metrics_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/metrics_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" ) func TestMetrics(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/migrate_test.go b/cmd/stellar-rpc/internal/integrationtest/migrate_test.go similarity index 93% rename from cmd/soroban-rpc/internal/integrationtest/migrate_test.go rename to cmd/stellar-rpc/internal/integrationtest/migrate_test.go index 2e646b2d..ba86fa29 100644 --- a/cmd/soroban-rpc/internal/integrationtest/migrate_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/migrate_test.go @@ -10,11 +10,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) -// Test that every Soroban RPC version (within the current protocol) can migrate cleanly to the current version +// Test that every Stellar RPC version (within the current protocol) can migrate cleanly to the current version // We cannot test prior protocol versions since the Transaction XDR used for the test could be incompatible // TODO: find a way to test migrations between protocols func TestMigrate(t *testing.T) { @@ -42,7 +42,7 @@ func TestMigrate(t *testing.T) { } func testMigrateFromVersion(t *testing.T, version string) { - sqliteFile := filepath.Join(t.TempDir(), "soroban-rpc.db") + sqliteFile := filepath.Join(t.TempDir(), "stellar-rpc.db") test := infrastructure.NewTest(t, &infrastructure.TestConfig{ UseReleasedRPCVersion: version, SQLitePath: sqliteFile, diff --git a/cmd/soroban-rpc/internal/integrationtest/simulate_transaction_test.go b/cmd/stellar-rpc/internal/integrationtest/simulate_transaction_test.go similarity index 99% rename from cmd/soroban-rpc/internal/integrationtest/simulate_transaction_test.go rename to cmd/stellar-rpc/internal/integrationtest/simulate_transaction_test.go index 5afc9a66..a9d4bf73 100644 --- a/cmd/soroban-rpc/internal/integrationtest/simulate_transaction_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/simulate_transaction_test.go @@ -13,8 +13,8 @@ import ( "github.com/stellar/go/txnbuild" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func TestSimulateTransactionSucceeds(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/transaction_test.go b/cmd/stellar-rpc/internal/integrationtest/transaction_test.go similarity index 98% rename from cmd/soroban-rpc/internal/integrationtest/transaction_test.go rename to cmd/stellar-rpc/internal/integrationtest/transaction_test.go index 1dfd1f4e..996e9251 100644 --- a/cmd/soroban-rpc/internal/integrationtest/transaction_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/transaction_test.go @@ -13,8 +13,8 @@ import ( "github.com/stellar/go/txnbuild" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" ) func TestSendTransactionSucceedsWithoutResults(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/integrationtest/upgrade_test.go b/cmd/stellar-rpc/internal/integrationtest/upgrade_test.go similarity index 91% rename from cmd/soroban-rpc/internal/integrationtest/upgrade_test.go rename to cmd/stellar-rpc/internal/integrationtest/upgrade_test.go index 70f9343a..37672d81 100644 --- a/cmd/soroban-rpc/internal/integrationtest/upgrade_test.go +++ b/cmd/stellar-rpc/internal/integrationtest/upgrade_test.go @@ -9,8 +9,8 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/integrationtest/infrastructure" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/integrationtest/infrastructure" ) func TestUpgradeFrom20To21(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/jsonrpc.go b/cmd/stellar-rpc/internal/jsonrpc.go similarity index 97% rename from cmd/soroban-rpc/internal/jsonrpc.go rename to cmd/stellar-rpc/internal/jsonrpc.go index c92d0070..b8e26ad0 100644 --- a/cmd/soroban-rpc/internal/jsonrpc.go +++ b/cmd/stellar-rpc/internal/jsonrpc.go @@ -18,12 +18,12 @@ import ( "github.com/stellar/go/support/log" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/feewindow" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/network" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/feewindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/methods" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/network" ) const ( diff --git a/cmd/soroban-rpc/internal/ledgerbucketwindow/ledgerbucketwindow.go b/cmd/stellar-rpc/internal/ledgerbucketwindow/ledgerbucketwindow.go similarity index 100% rename from cmd/soroban-rpc/internal/ledgerbucketwindow/ledgerbucketwindow.go rename to cmd/stellar-rpc/internal/ledgerbucketwindow/ledgerbucketwindow.go diff --git a/cmd/soroban-rpc/internal/ledgerbucketwindow/ledgerbucketwindow_test.go b/cmd/stellar-rpc/internal/ledgerbucketwindow/ledgerbucketwindow_test.go similarity index 100% rename from cmd/soroban-rpc/internal/ledgerbucketwindow/ledgerbucketwindow_test.go rename to cmd/stellar-rpc/internal/ledgerbucketwindow/ledgerbucketwindow_test.go diff --git a/cmd/soroban-rpc/internal/methods/get_events.go b/cmd/stellar-rpc/internal/methods/get_events.go similarity index 99% rename from cmd/soroban-rpc/internal/methods/get_events.go rename to cmd/stellar-rpc/internal/methods/get_events.go index 0bc7ab11..8408ef95 100644 --- a/cmd/soroban-rpc/internal/methods/get_events.go +++ b/cmd/stellar-rpc/internal/methods/get_events.go @@ -16,8 +16,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) const ( diff --git a/cmd/soroban-rpc/internal/methods/get_events_test.go b/cmd/stellar-rpc/internal/methods/get_events_test.go similarity index 99% rename from cmd/soroban-rpc/internal/methods/get_events_test.go rename to cmd/stellar-rpc/internal/methods/get_events_test.go index cd06b0e3..f00a7e59 100644 --- a/cmd/soroban-rpc/internal/methods/get_events_test.go +++ b/cmd/stellar-rpc/internal/methods/get_events_test.go @@ -21,9 +21,9 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) var passphrase = "passphrase" diff --git a/cmd/soroban-rpc/internal/methods/get_fee_stats.go b/cmd/stellar-rpc/internal/methods/get_fee_stats.go similarity index 95% rename from cmd/soroban-rpc/internal/methods/get_fee_stats.go rename to cmd/stellar-rpc/internal/methods/get_fee_stats.go index 9fd85d76..fc160737 100644 --- a/cmd/soroban-rpc/internal/methods/get_fee_stats.go +++ b/cmd/stellar-rpc/internal/methods/get_fee_stats.go @@ -7,8 +7,8 @@ import ( "github.com/stellar/go/support/log" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/feewindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/feewindow" ) type FeeDistribution struct { diff --git a/cmd/soroban-rpc/internal/methods/get_latest_ledger.go b/cmd/stellar-rpc/internal/methods/get_latest_ledger.go similarity index 95% rename from cmd/soroban-rpc/internal/methods/get_latest_ledger.go rename to cmd/stellar-rpc/internal/methods/get_latest_ledger.go index c330adb4..db69ee18 100644 --- a/cmd/soroban-rpc/internal/methods/get_latest_ledger.go +++ b/cmd/stellar-rpc/internal/methods/get_latest_ledger.go @@ -5,7 +5,7 @@ import ( "github.com/creachadair/jrpc2" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) type GetLatestLedgerResponse struct { diff --git a/cmd/soroban-rpc/internal/methods/get_latest_ledger_test.go b/cmd/stellar-rpc/internal/methods/get_latest_ledger_test.go similarity index 95% rename from cmd/soroban-rpc/internal/methods/get_latest_ledger_test.go rename to cmd/stellar-rpc/internal/methods/get_latest_ledger_test.go index 251b3e34..a2284fb7 100644 --- a/cmd/soroban-rpc/internal/methods/get_latest_ledger_test.go +++ b/cmd/stellar-rpc/internal/methods/get_latest_ledger_test.go @@ -11,8 +11,8 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) const ( diff --git a/cmd/soroban-rpc/internal/methods/get_ledger_entries.go b/cmd/stellar-rpc/internal/methods/get_ledger_entries.go similarity index 97% rename from cmd/soroban-rpc/internal/methods/get_ledger_entries.go rename to cmd/stellar-rpc/internal/methods/get_ledger_entries.go index 10d179ff..929b8a5f 100644 --- a/cmd/soroban-rpc/internal/methods/get_ledger_entries.go +++ b/cmd/stellar-rpc/internal/methods/get_ledger_entries.go @@ -10,8 +10,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) //nolint:gochecknoglobals diff --git a/cmd/soroban-rpc/internal/methods/get_ledgers.go b/cmd/stellar-rpc/internal/methods/get_ledgers.go similarity index 98% rename from cmd/soroban-rpc/internal/methods/get_ledgers.go rename to cmd/stellar-rpc/internal/methods/get_ledgers.go index 0d63e85e..8d6a5707 100644 --- a/cmd/soroban-rpc/internal/methods/get_ledgers.go +++ b/cmd/stellar-rpc/internal/methods/get_ledgers.go @@ -12,8 +12,8 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) type LedgerPaginationOptions struct { diff --git a/cmd/soroban-rpc/internal/methods/get_ledgers_test.go b/cmd/stellar-rpc/internal/methods/get_ledgers_test.go similarity index 98% rename from cmd/soroban-rpc/internal/methods/get_ledgers_test.go rename to cmd/stellar-rpc/internal/methods/get_ledgers_test.go index 2d0ae5a4..dec24f3f 100644 --- a/cmd/soroban-rpc/internal/methods/get_ledgers_test.go +++ b/cmd/stellar-rpc/internal/methods/get_ledgers_test.go @@ -11,8 +11,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) var expectedLedgerInfo = LedgerInfo{ diff --git a/cmd/soroban-rpc/internal/methods/get_network.go b/cmd/stellar-rpc/internal/methods/get_network.go similarity index 94% rename from cmd/soroban-rpc/internal/methods/get_network.go rename to cmd/stellar-rpc/internal/methods/get_network.go index 16b2b650..8bd72b69 100644 --- a/cmd/soroban-rpc/internal/methods/get_network.go +++ b/cmd/stellar-rpc/internal/methods/get_network.go @@ -5,7 +5,7 @@ import ( "github.com/creachadair/jrpc2" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) type GetNetworkRequest struct{} diff --git a/cmd/soroban-rpc/internal/methods/get_transaction.go b/cmd/stellar-rpc/internal/methods/get_transaction.go similarity index 94% rename from cmd/soroban-rpc/internal/methods/get_transaction.go rename to cmd/stellar-rpc/internal/methods/get_transaction.go index 592a8880..9c31f092 100644 --- a/cmd/soroban-rpc/internal/methods/get_transaction.go +++ b/cmd/stellar-rpc/internal/methods/get_transaction.go @@ -12,14 +12,14 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) const ( // TransactionStatusSuccess indicates the transaction was included in the ledger and // it was executed without errors. TransactionStatusSuccess = "SUCCESS" - // TransactionStatusNotFound indicates the transaction was not found in Soroban-RPC's + // TransactionStatusNotFound indicates the transaction was not found in Stellar-RPC's // transaction store. TransactionStatusNotFound = "NOT_FOUND" // TransactionStatusFailed indicates the transaction was included in the ledger and @@ -27,13 +27,13 @@ const ( TransactionStatusFailed = "FAILED" ) -// GetTransactionResponse is the response for the Soroban-RPC getTransaction() endpoint +// GetTransactionResponse is the response for the Stellar-RPC getTransaction() endpoint type GetTransactionResponse struct { - // LatestLedger is the latest ledger stored in Soroban-RPC. + // LatestLedger is the latest ledger stored in Stellar-RPC. LatestLedger uint32 `json:"latestLedger"` // LatestLedgerCloseTime is the unix timestamp of when the latest ledger was closed. LatestLedgerCloseTime int64 `json:"latestLedgerCloseTime,string"` - // LatestLedger is the oldest ledger stored in Soroban-RPC. + // LatestLedger is the oldest ledger stored in Stellar-RPC. OldestLedger uint32 `json:"oldestLedger"` // LatestLedgerCloseTime is the unix timestamp of when the oldest ledger was closed. OldestLedgerCloseTime int64 `json:"oldestLedgerCloseTime,string"` diff --git a/cmd/soroban-rpc/internal/methods/get_transaction_test.go b/cmd/stellar-rpc/internal/methods/get_transaction_test.go similarity index 98% rename from cmd/soroban-rpc/internal/methods/get_transaction_test.go rename to cmd/stellar-rpc/internal/methods/get_transaction_test.go index 03f35658..74c334c4 100644 --- a/cmd/soroban-rpc/internal/methods/get_transaction_test.go +++ b/cmd/stellar-rpc/internal/methods/get_transaction_test.go @@ -13,8 +13,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) func TestGetTransaction(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/methods/get_transactions.go b/cmd/stellar-rpc/internal/methods/get_transactions.go similarity index 98% rename from cmd/soroban-rpc/internal/methods/get_transactions.go rename to cmd/stellar-rpc/internal/methods/get_transactions.go index 3d1d7efe..1f3d4b33 100644 --- a/cmd/soroban-rpc/internal/methods/get_transactions.go +++ b/cmd/stellar-rpc/internal/methods/get_transactions.go @@ -17,8 +17,8 @@ import ( "github.com/stellar/go/toid" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/ledgerbucketwindow" ) // TransactionsPaginationOptions defines the available options for paginating through transactions. diff --git a/cmd/soroban-rpc/internal/methods/get_transactions_test.go b/cmd/stellar-rpc/internal/methods/get_transactions_test.go similarity index 99% rename from cmd/soroban-rpc/internal/methods/get_transactions_test.go rename to cmd/stellar-rpc/internal/methods/get_transactions_test.go index 531ed9de..3ad026ab 100644 --- a/cmd/soroban-rpc/internal/methods/get_transactions_test.go +++ b/cmd/stellar-rpc/internal/methods/get_transactions_test.go @@ -13,7 +13,7 @@ import ( "github.com/stellar/go/toid" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) const ( diff --git a/cmd/soroban-rpc/internal/methods/get_version_info.go b/cmd/stellar-rpc/internal/methods/get_version_info.go similarity index 90% rename from cmd/soroban-rpc/internal/methods/get_version_info.go rename to cmd/stellar-rpc/internal/methods/get_version_info.go index 69000c66..ad5d9d79 100644 --- a/cmd/soroban-rpc/internal/methods/get_version_info.go +++ b/cmd/stellar-rpc/internal/methods/get_version_info.go @@ -8,9 +8,9 @@ import ( "github.com/stellar/go/support/log" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) type GetVersionInfoResponse struct { diff --git a/cmd/soroban-rpc/internal/methods/handler.go b/cmd/stellar-rpc/internal/methods/handler.go similarity index 100% rename from cmd/soroban-rpc/internal/methods/handler.go rename to cmd/stellar-rpc/internal/methods/handler.go diff --git a/cmd/soroban-rpc/internal/methods/handler_test.go b/cmd/stellar-rpc/internal/methods/handler_test.go similarity index 100% rename from cmd/soroban-rpc/internal/methods/handler_test.go rename to cmd/stellar-rpc/internal/methods/handler_test.go diff --git a/cmd/soroban-rpc/internal/methods/health.go b/cmd/stellar-rpc/internal/methods/health.go similarity index 96% rename from cmd/soroban-rpc/internal/methods/health.go rename to cmd/stellar-rpc/internal/methods/health.go index 8de0767c..edfc9b25 100644 --- a/cmd/soroban-rpc/internal/methods/health.go +++ b/cmd/stellar-rpc/internal/methods/health.go @@ -7,7 +7,7 @@ import ( "github.com/creachadair/jrpc2" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) type HealthCheckResult struct { diff --git a/cmd/soroban-rpc/internal/methods/json.go b/cmd/stellar-rpc/internal/methods/json.go similarity index 92% rename from cmd/soroban-rpc/internal/methods/json.go rename to cmd/stellar-rpc/internal/methods/json.go index 7f271a49..310d1995 100644 --- a/cmd/soroban-rpc/internal/methods/json.go +++ b/cmd/stellar-rpc/internal/methods/json.go @@ -8,8 +8,8 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) const ( diff --git a/cmd/soroban-rpc/internal/methods/send_transaction.go b/cmd/stellar-rpc/internal/methods/send_transaction.go similarity index 94% rename from cmd/soroban-rpc/internal/methods/send_transaction.go rename to cmd/stellar-rpc/internal/methods/send_transaction.go index a73a0140..d23bc648 100644 --- a/cmd/soroban-rpc/internal/methods/send_transaction.go +++ b/cmd/stellar-rpc/internal/methods/send_transaction.go @@ -13,12 +13,12 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) -// SendTransactionResponse represents the transaction submission response returned Soroban-RPC +// SendTransactionResponse represents the transaction submission response returned Stellar-RPC type SendTransactionResponse struct { // ErrorResultXDR is present only if Status is equal to proto.TXStatusError. // ErrorResultXDR is a TransactionResult xdr string which contains details on why @@ -38,15 +38,15 @@ type SendTransactionResponse struct { // Hash is a hash of the transaction which can be used to look up whether // the transaction was included in the ledger. Hash string `json:"hash"` - // LatestLedger is the latest ledger known to Soroban-RPC at the time it handled + // LatestLedger is the latest ledger known to Stellar-RPC at the time it handled // the transaction submission request. LatestLedger uint32 `json:"latestLedger"` // LatestLedgerCloseTime is the unix timestamp of the close time of the latest ledger known to - // Soroban-RPC at the time it handled the transaction submission request. + // Stellar-RPC at the time it handled the transaction submission request. LatestLedgerCloseTime int64 `json:"latestLedgerCloseTime,string"` } -// SendTransactionRequest is the Soroban-RPC request to submit a transaction. +// SendTransactionRequest is the Stellar-RPC request to submit a transaction. type SendTransactionRequest struct { // Transaction is the base64 encoded transaction envelope. Transaction string `json:"transaction"` diff --git a/cmd/soroban-rpc/internal/methods/simulate_transaction.go b/cmd/stellar-rpc/internal/methods/simulate_transaction.go similarity index 98% rename from cmd/soroban-rpc/internal/methods/simulate_transaction.go rename to cmd/stellar-rpc/internal/methods/simulate_transaction.go index 7e8a3e6d..dc56fff8 100644 --- a/cmd/soroban-rpc/internal/methods/simulate_transaction.go +++ b/cmd/stellar-rpc/internal/methods/simulate_transaction.go @@ -13,10 +13,10 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/preflight" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/preflight" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) type SimulateTransactionRequest struct { diff --git a/cmd/soroban-rpc/internal/methods/simulate_transaction_test.go b/cmd/stellar-rpc/internal/methods/simulate_transaction_test.go similarity index 95% rename from cmd/soroban-rpc/internal/methods/simulate_transaction_test.go rename to cmd/stellar-rpc/internal/methods/simulate_transaction_test.go index ac60b07f..bb70ebda 100644 --- a/cmd/soroban-rpc/internal/methods/simulate_transaction_test.go +++ b/cmd/stellar-rpc/internal/methods/simulate_transaction_test.go @@ -9,8 +9,8 @@ import ( "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/preflight" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/xdr2json" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/preflight" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/xdr2json" ) func TestLedgerEntryChange(t *testing.T) { diff --git a/cmd/soroban-rpc/internal/methods/util.go b/cmd/stellar-rpc/internal/methods/util.go similarity index 91% rename from cmd/soroban-rpc/internal/methods/util.go rename to cmd/stellar-rpc/internal/methods/util.go index eafad857..c2d1367e 100644 --- a/cmd/soroban-rpc/internal/methods/util.go +++ b/cmd/stellar-rpc/internal/methods/util.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) func getProtocolVersion( diff --git a/cmd/soroban-rpc/internal/methods/util_test.go b/cmd/stellar-rpc/internal/methods/util_test.go similarity index 95% rename from cmd/soroban-rpc/internal/methods/util_test.go rename to cmd/stellar-rpc/internal/methods/util_test.go index 399224e4..885a0b55 100644 --- a/cmd/soroban-rpc/internal/methods/util_test.go +++ b/cmd/stellar-rpc/internal/methods/util_test.go @@ -11,8 +11,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) func BenchmarkGetProtocolVersion(b *testing.B) { diff --git a/cmd/soroban-rpc/internal/network/backlogQ.go b/cmd/stellar-rpc/internal/network/backlogQ.go similarity index 100% rename from cmd/soroban-rpc/internal/network/backlogQ.go rename to cmd/stellar-rpc/internal/network/backlogQ.go diff --git a/cmd/soroban-rpc/internal/network/backlogQ_test.go b/cmd/stellar-rpc/internal/network/backlogQ_test.go similarity index 100% rename from cmd/soroban-rpc/internal/network/backlogQ_test.go rename to cmd/stellar-rpc/internal/network/backlogQ_test.go diff --git a/cmd/soroban-rpc/internal/network/requestdurationlimiter.go b/cmd/stellar-rpc/internal/network/requestdurationlimiter.go similarity index 99% rename from cmd/soroban-rpc/internal/network/requestdurationlimiter.go rename to cmd/stellar-rpc/internal/network/requestdurationlimiter.go index c54350ca..31e6156b 100644 --- a/cmd/soroban-rpc/internal/network/requestdurationlimiter.go +++ b/cmd/stellar-rpc/internal/network/requestdurationlimiter.go @@ -12,7 +12,7 @@ import ( "github.com/stellar/go/support/log" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/util" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/util" ) const maxDuration = time.Duration(math.MaxInt64) diff --git a/cmd/soroban-rpc/internal/network/requestdurationlimiter_test.go b/cmd/stellar-rpc/internal/network/requestdurationlimiter_test.go similarity index 100% rename from cmd/soroban-rpc/internal/network/requestdurationlimiter_test.go rename to cmd/stellar-rpc/internal/network/requestdurationlimiter_test.go diff --git a/cmd/soroban-rpc/internal/network/utils_test.go b/cmd/stellar-rpc/internal/network/utils_test.go similarity index 100% rename from cmd/soroban-rpc/internal/network/utils_test.go rename to cmd/stellar-rpc/internal/network/utils_test.go diff --git a/cmd/soroban-rpc/internal/preflight/pool.go b/cmd/stellar-rpc/internal/preflight/pool.go similarity index 97% rename from cmd/soroban-rpc/internal/preflight/pool.go rename to cmd/stellar-rpc/internal/preflight/pool.go index ec59f615..2ce7a339 100644 --- a/cmd/soroban-rpc/internal/preflight/pool.go +++ b/cmd/stellar-rpc/internal/preflight/pool.go @@ -12,8 +12,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) const ( diff --git a/cmd/soroban-rpc/internal/preflight/preflight.go b/cmd/stellar-rpc/internal/preflight/preflight.go similarity index 99% rename from cmd/soroban-rpc/internal/preflight/preflight.go rename to cmd/stellar-rpc/internal/preflight/preflight.go index fe2cc3a5..754a8184 100644 --- a/cmd/soroban-rpc/internal/preflight/preflight.go +++ b/cmd/stellar-rpc/internal/preflight/preflight.go @@ -27,7 +27,7 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) type snapshotSourceHandle struct { diff --git a/cmd/soroban-rpc/internal/preflight/preflight_test.go b/cmd/stellar-rpc/internal/preflight/preflight_test.go similarity index 99% rename from cmd/soroban-rpc/internal/preflight/preflight_test.go rename to cmd/stellar-rpc/internal/preflight/preflight_test.go index c1bd72a7..75cfb1b7 100644 --- a/cmd/soroban-rpc/internal/preflight/preflight_test.go +++ b/cmd/stellar-rpc/internal/preflight/preflight_test.go @@ -14,8 +14,8 @@ import ( "github.com/stellar/go/support/log" "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon/interfaces" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/db" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon/interfaces" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/db" ) var ( diff --git a/cmd/soroban-rpc/internal/util/panicgroup.go b/cmd/stellar-rpc/internal/util/panicgroup.go similarity index 100% rename from cmd/soroban-rpc/internal/util/panicgroup.go rename to cmd/stellar-rpc/internal/util/panicgroup.go diff --git a/cmd/soroban-rpc/internal/util/panicgroup_test.go b/cmd/stellar-rpc/internal/util/panicgroup_test.go similarity index 100% rename from cmd/soroban-rpc/internal/util/panicgroup_test.go rename to cmd/stellar-rpc/internal/util/panicgroup_test.go diff --git a/cmd/soroban-rpc/internal/xdr2json/conversion.go b/cmd/stellar-rpc/internal/xdr2json/conversion.go similarity index 100% rename from cmd/soroban-rpc/internal/xdr2json/conversion.go rename to cmd/stellar-rpc/internal/xdr2json/conversion.go diff --git a/cmd/soroban-rpc/internal/xdr2json/conversion_test.go b/cmd/stellar-rpc/internal/xdr2json/conversion_test.go similarity index 100% rename from cmd/soroban-rpc/internal/xdr2json/conversion_test.go rename to cmd/stellar-rpc/internal/xdr2json/conversion_test.go diff --git a/cmd/soroban-rpc/lib/ffi/Cargo.toml b/cmd/stellar-rpc/lib/ffi/Cargo.toml similarity index 100% rename from cmd/soroban-rpc/lib/ffi/Cargo.toml rename to cmd/stellar-rpc/lib/ffi/Cargo.toml diff --git a/cmd/soroban-rpc/lib/ffi/src/lib.rs b/cmd/stellar-rpc/lib/ffi/src/lib.rs similarity index 100% rename from cmd/soroban-rpc/lib/ffi/src/lib.rs rename to cmd/stellar-rpc/lib/ffi/src/lib.rs diff --git a/cmd/soroban-rpc/lib/preflight.h b/cmd/stellar-rpc/lib/preflight.h similarity index 100% rename from cmd/soroban-rpc/lib/preflight.h rename to cmd/stellar-rpc/lib/preflight.h diff --git a/cmd/soroban-rpc/lib/preflight/Cargo.toml b/cmd/stellar-rpc/lib/preflight/Cargo.toml similarity index 92% rename from cmd/soroban-rpc/lib/preflight/Cargo.toml rename to cmd/stellar-rpc/lib/preflight/Cargo.toml index 06e202c0..8f52881f 100644 --- a/cmd/soroban-rpc/lib/preflight/Cargo.toml +++ b/cmd/stellar-rpc/lib/preflight/Cargo.toml @@ -15,7 +15,7 @@ libc = { workspace = true } sha2 = { workspace = true } # we need the testutils feature in order to get backtraces in the preflight library -# when soroban rpc is configured to run with --preflight-enable-debug +# when stellar rpc is configured to run with --preflight-enable-debug soroban-env-host-prev = { workspace = true, features = ["recording_mode", "testutils", "unstable-next-api"]} soroban-simulation-prev = { workspace = true } soroban-env-host-curr = { workspace = true, features = ["recording_mode", "testutils", "unstable-next-api"]} diff --git a/cmd/soroban-rpc/lib/preflight/src/lib.rs b/cmd/stellar-rpc/lib/preflight/src/lib.rs similarity index 100% rename from cmd/soroban-rpc/lib/preflight/src/lib.rs rename to cmd/stellar-rpc/lib/preflight/src/lib.rs diff --git a/cmd/soroban-rpc/lib/preflight/src/shared.rs b/cmd/stellar-rpc/lib/preflight/src/shared.rs similarity index 100% rename from cmd/soroban-rpc/lib/preflight/src/shared.rs rename to cmd/stellar-rpc/lib/preflight/src/shared.rs diff --git a/cmd/soroban-rpc/lib/shared.h b/cmd/stellar-rpc/lib/shared.h similarity index 100% rename from cmd/soroban-rpc/lib/shared.h rename to cmd/stellar-rpc/lib/shared.h diff --git a/cmd/soroban-rpc/lib/xdr2json.h b/cmd/stellar-rpc/lib/xdr2json.h similarity index 100% rename from cmd/soroban-rpc/lib/xdr2json.h rename to cmd/stellar-rpc/lib/xdr2json.h diff --git a/cmd/soroban-rpc/lib/xdr2json/Cargo.toml b/cmd/stellar-rpc/lib/xdr2json/Cargo.toml similarity index 100% rename from cmd/soroban-rpc/lib/xdr2json/Cargo.toml rename to cmd/stellar-rpc/lib/xdr2json/Cargo.toml diff --git a/cmd/soroban-rpc/lib/xdr2json/src/lib.rs b/cmd/stellar-rpc/lib/xdr2json/src/lib.rs similarity index 100% rename from cmd/soroban-rpc/lib/xdr2json/src/lib.rs rename to cmd/stellar-rpc/lib/xdr2json/src/lib.rs diff --git a/cmd/soroban-rpc/main.go b/cmd/stellar-rpc/main.go similarity index 87% rename from cmd/soroban-rpc/main.go rename to cmd/stellar-rpc/main.go index e2150451..ed40737c 100644 --- a/cmd/soroban-rpc/main.go +++ b/cmd/stellar-rpc/main.go @@ -9,16 +9,16 @@ import ( supportlog "github.com/stellar/go/support/log" goxdr "github.com/stellar/go/xdr" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/config" - "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/daemon" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/config" + "github.com/stellar/stellar-rpc/cmd/stellar-rpc/internal/daemon" ) func main() { var cfg config.Config rootCmd := &cobra.Command{ - Use: "soroban-rpc", - Short: "Start the remote soroban-rpc server", + Use: "stellar-rpc", + Short: "Start the remote stellar-rpc server", Run: func(_ *cobra.Command, _ []string) { if err := cfg.SetValues(os.LookupEnv); err != nil { fmt.Fprintln(os.Stderr, err) @@ -38,7 +38,7 @@ func main() { Run: func(_ *cobra.Command, _ []string) { if config.CommitHash == "" { //nolint:forbidigo - fmt.Printf("soroban-rpc dev\n") + fmt.Printf("stellar-rpc dev\n") } else { // avoid printing the branch for the main branch // ( since that's what the end-user would typically have ) @@ -49,7 +49,7 @@ func main() { branch = "" } //nolint:forbidigo - fmt.Printf("soroban-rpc %s (%s) %s\n", config.Version, config.CommitHash, branch) + fmt.Printf("stellar-rpc %s (%s) %s\n", config.Version, config.CommitHash, branch) } //nolint:forbidigo fmt.Printf("stellar-xdr %s\n", goxdr.CommitHash) diff --git a/docs/MONITORING.md b/docs/MONITORING.md index 2a511198..e989218b 100644 --- a/docs/MONITORING.md +++ b/docs/MONITORING.md @@ -1,14 +1,14 @@ -# Monitoring and Tuning Guide for soroban-rpc +# Monitoring and Tuning Guide for stellar-rpc ## Introduction -This document provides a comprehensive guide to monitoring and tuning soroban-rpc, a backend server that communicates using the jrpc (JSON-RPC) protocol over HTTP. To ensure high -availability, high performance, and efficient resource utilization, soroban-rpc incorporates various features like limiting concurrent requests, controlling execution times, and providing +This document provides a comprehensive guide to monitoring and tuning stellar-rpc, a backend server that communicates using the jrpc (JSON-RPC) protocol over HTTP. To ensure high +availability, high performance, and efficient resource utilization, stellar-rpc incorporates various features like limiting concurrent requests, controlling execution times, and providing warning and limiting mechanisms. This guide aims to help operators effectively monitor the server, detect potential issues, and apply tuning strategies to maintain optimal performance. ## Monitoring Metrics -To ensure the smooth operation of soroban-rpc, several key metrics should be monitored continuously: +To ensure the smooth operation of stellar-rpc, several key metrics should be monitored continuously: 1. **Global Inflight Requests (Concurrent HTTP Requests)**: Monitor the number of concurrent HTTP requests being enqueued at the HTTP endpoint. This metric is tracked via the `global_inflight_requests` gauge. If this number reaches the predefined limit, an HTTP 503 error is generated. This metric helps identify if the server is reaching its limit in handling @@ -27,12 +27,12 @@ To ensure the smooth operation of soroban-rpc, several key metrics should be mon ## Best Practices -Follow these best practices to maintain a stable and performant soroban-rpc deployment: +Follow these best practices to maintain a stable and performant stellar-rpc deployment: 1. **Set Sensible Limits**: Determine appropriate limits for concurrent requests, method execution times, and HTTP request duration based on your server's resources and expected workload. Avoid overly restrictive limits that may hinder normal operations. -2. **Logging and Alerts**: The soroban-rpc comes ready with logging and metric endpoint, which reports operational status. On your end, develop the toolings that would allow you to be aware of these events. These toolings could be Grafana alerts, log scraping or similar tools. +2. **Logging and Alerts**: The stellar-rpc comes ready with logging and metric endpoint, which reports operational status. On your end, develop the toolings that would allow you to be aware of these events. These toolings could be Grafana alerts, log scraping or similar tools. 3. **Load Testing**: Regularly conduct load testing to assess the server's performance under varying workloads. Use this data to adjust limits and execution times as needed. diff --git a/go.mod b/go.mod index e2d415f0..e2fca59d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/stellar/soroban-rpc +module github.com/stellar/stellar-rpc go 1.22 diff --git a/scripts/check-dependencies.bash b/scripts/check-dependencies.bash index b32e20be..35316a60 100755 --- a/scripts/check-dependencies.bash +++ b/scripts/check-dependencies.bash @@ -89,14 +89,14 @@ fi # Now, lets make sure that the core and captive core version used in the tests use the same version and that they depend # on the same XDR revision -PROTOCOL_VERSIONS=$(grep 'protocol-version: ' .github/workflows/soroban-rpc.yml | grep -o -E '[0-9]+') +PROTOCOL_VERSIONS=$(grep 'protocol-version: ' .github/workflows/stellar-rpc.yml | grep -o -E '[0-9]+') for P in $PROTOCOL_VERSIONS; do - CORE_CONTAINER_REVISION=$($SED -n 's/.*PROTOCOL_'$P'_CORE_DOCKER_IMG:.*\/\(stellar-core\|unsafe-stellar-core\(-next\)\{0,1\}\)\:.*\.\([a-zA-Z0-9]*\)\..*/\3/p' < .github/workflows/soroban-rpc.yml) - CAPTIVE_CORE_PKG_REVISION=$($SED -n 's/.*PROTOCOL_'$P'_CORE_DEBIAN_PKG_VERSION:.*\.\([a-zA-Z0-9]*\)\..*/\1/p' < .github/workflows/soroban-rpc.yml) + CORE_CONTAINER_REVISION=$($SED -n 's/.*PROTOCOL_'$P'_CORE_DOCKER_IMG:.*\/\(stellar-core\|unsafe-stellar-core\(-next\)\{0,1\}\)\:.*\.\([a-zA-Z0-9]*\)\..*/\3/p' < .github/workflows/stellar-rpc.yml) + CAPTIVE_CORE_PKG_REVISION=$($SED -n 's/.*PROTOCOL_'$P'_CORE_DEBIAN_PKG_VERSION:.*\.\([a-zA-Z0-9]*\)\..*/\1/p' < .github/workflows/stellar-rpc.yml) if [ "$CORE_CONTAINER_REVISION" != "$CAPTIVE_CORE_PKG_REVISION" ]; then - echo "Soroban RPC protocol $P integration tests are using different versions of the Core container and Captive Core Debian package." + echo "Stellar RPC protocol $P integration tests are using different versions of the Core container and Captive Core Debian package." echo echo "Core container image commit $CORE_CONTAINER_REVISION" echo "Captive core debian package commit $CAPTIVE_CORE_PKG_REVISION"