Skip to content

Commit

Permalink
Rename Soroban RPC to Stellar RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Nov 19, 2024
1 parent c7e9737 commit 91770a7
Show file tree
Hide file tree
Showing 128 changed files with 248 additions and 248 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/required_status_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ jobs:
Dependency sanity checker*
Go*
Rust*
Soroban RPC*
Stellar RPC*
16 changes: 8 additions & 8 deletions .github/workflows/soroban-rpc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Soroban RPC
name: Stellar RPC

defaults:
run:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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/...
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 21 additions & 21 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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 {
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 -
Expand All @@ -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


Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# 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
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
28 changes: 14 additions & 14 deletions cmd/soroban-rpc/README.md → cmd/stellar-rpc/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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/)
Expand All @@ -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 <PATH_TO_THE_RPC_CONFIG_FILE>
./stellar-rpc --config-path <PATH_TO_THE_RPC_CONFIG_FILE>
```
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading

0 comments on commit 91770a7

Please sign in to comment.