diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml index 9afb1a8d6..89ad70901 100644 --- a/.github/workflows/binaries.yml +++ b/.github/workflows/binaries.yml @@ -34,21 +34,25 @@ jobs: - run: rustup target add ${{ matrix.target }} - if: matrix.target == 'aarch64-unknown-linux-gnu' run: sudo apt-get update && sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - - name: Setup Version and Name + - name: Setup vars run: | version="$(cargo metadata --format-version 1 --no-deps | jq -r '.packages[] | select(.name == "soroban-cli") | .version')" echo "VERSION=${version}" >> $GITHUB_ENV echo "NAME=soroban-cli-${version}-${{ matrix.target }}" >> $GITHUB_ENV - - name: Package + - name: Package (release only) + if: github.event_name == 'release' run: cargo package --no-verify - - name: Build - env: - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + - name: Package Extract (release only) + if: github.event_name == 'release' run: | cd target/package tar xvfz soroban-cli-$VERSION.crate - cd soroban-cli-$VERSION - cargo build --target-dir=../.. --features opt --release --target ${{ matrix.target }} + echo "BUILD_WORKING_DIR=target/package/soroban-cli-$VERSION" >> $GITHUB_ENV + - name: Build + env: + CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc + working-directory: ${{ env.BUILD_WORKING_DIR }} + run: cargo build --target-dir="$GITHUB_WORKSPACE/target" --features opt --release --target ${{ matrix.target }} - name: Compress run: | cd target/${{ matrix.target }}/release @@ -58,7 +62,7 @@ jobs: with: name: ${{ env.NAME }} path: 'target/${{ matrix.target }}/release/${{ env.NAME }}.tar.gz' - - name: Upload to Release + - name: Upload to Release (release only) if: github.event_name == 'release' uses: actions/github-script@v6 with: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 73e40e913..0704d4a55 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -13,21 +13,30 @@ jobs: scenario-filter: ["^TestDappDevelop$/^.*$"] runs-on: ubuntu-latest-4-cores env: + # where git refs and images are available for the same artifact, the image + # can be set to pull a pre-compiled image from dockerhub, while the git + # refs can be used to build from source within this workflow. + # the gh tag of system-test repo version to run SYSTEM_TEST_GIT_REF: master + # the pre-compiled image to use of quickstart, or the git ref to build + # from source. + SYSTEM_TEST_QUICKSTART_IMAGE: stellar/quickstart:v423-testing + # SYSTEM_TEST_QUICKSTART_GIT_REF: "https://github.com/stellar/quickstart.git#master" + + # the version of components built in quickstart. only used if quickstart + # is configured above to build from source. + # SYSTEM_TEST_PROTOCOL_VERSION_DEFAULT: 21 + # SYSTEM_TEST_RS_XDR_GIT_REF: v21.0.1 + # SYSTEM_TEST_CORE_IMAGE: + # SYSTEM_TEST_CORE_GIT_REF: https://github.com/stellar/stellar-core.git#v21.0.0rc1 + # SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS: "--disable-tests" + # SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git#v21.0.1 + # 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: ${{ github.workspace }}/soroban-cli - SYSTEM_TEST_SOROBAN_RPC_REF: https://github.com/stellar/soroban-rpc.git#v20.3.3 - - # 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, - SYSTEM_TEST_CORE_GIT_REF: https://github.com/stellar/stellar-core.git#v20.2.0 - SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS: "--disable-tests" - # or set SYSTEM_TEST_CORE_GIT_REF to empty, and set SYSTEM_TEST_CORE_IMAGE - # to pull a pre-compiled image from dockerhub instead - SYSTEM_TEST_CORE_IMAGE: # sets the version of rust toolchain that will be pre-installed in the # test runtime environment, tests invoke rustc/cargo @@ -35,21 +44,13 @@ jobs: # set the version of js-stellar-sdk to use, need to choose one of either # resolution options, using npm release or a gh ref: - # # option #1, set the version of stellar-sdk based on a npm release version - SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION: 11.2.2 + SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION: 11.3.0 # option #2, set the version of stellar-sdk used as a ref to a gh repo if # a value is set on SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO, it takes # precedence over any SYSTEM_TEST_JS_STELLAR_SDK_NPM_VERSION - SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO: - SYSTEM_TEST_JS_STELLAR_SDK_GH_REF: - - # the version of rs-stellar-xdr to use for quickstart - SYSTEM_TEST_RS_XDR_GIT_REF: v20.1.0 - - # system test will build quickstart image internally to use for running - # the service stack configured in standalone network mode(core, rpc) - SYSTEM_TEST_QUICKSTART_GIT_REF: https://github.com/stellar/quickstart.git#eeb44ee99c564275654800edea2e426d73e966b8 + # SYSTEM_TEST_JS_STELLAR_SDK_GH_REPO: + # SYSTEM_TEST_JS_STELLAR_SDK_GH_REF: # triggers system test to log out details from quickstart's logs and test steps SYSTEM_TEST_VERBOSE_OUTPUT: "true" @@ -92,6 +93,7 @@ jobs: JS_STELLAR_SDK_REF="file:/home/tester/js-stellar-sdk"; \ fi make \ + PROTOCOL_VERSION_DEFAULT=$SYSTEM_TEST_PROTOCOL_VERSION_DEFAULT \ CORE_GIT_REF=$SYSTEM_TEST_CORE_GIT_REF \ CORE_COMPILE_CONFIGURE_FLAGS="$SYSTEM_TEST_CORE_COMPILE_CONFIGURE_FLAGS" \ CORE_IMAGE=$SYSTEM_TEST_CORE_IMAGE \ @@ -99,6 +101,7 @@ jobs: SOROBAN_CLI_GIT_REF=$SYSTEM_TEST_SOROBAN_CLI_REF \ RUST_TOOLCHAIN_VERSION=$SYSTEM_TEST_RUST_TOOLCHAIN_VERSION \ RS_XDR_GIT_REF=$SYSTEM_TEST_RS_XDR_GIT_REF \ + QUICKSTART_IMAGE=$SYSTEM_TEST_QUICKSTART_IMAGE \ QUICKSTART_GIT_REF=$SYSTEM_TEST_QUICKSTART_GIT_REF \ JS_STELLAR_SDK_NPM_VERSION=$JS_STELLAR_SDK_REF \ build diff --git a/.github/workflows/rpc-tests.yml b/.github/workflows/rpc-tests.yml index a388754e9..ad999830a 100644 --- a/.github/workflows/rpc-tests.yml +++ b/.github/workflows/rpc-tests.yml @@ -11,13 +11,13 @@ jobs: runs-on: ubuntu-22.04 services: rpc: - image: stellar/quickstart:testing@sha256:7f074dddaf081b21d273f7346325cc1017c38bbee7b839f8b633b280a663232d + image: stellar/quickstart:v423-testing ports: - 8000:8000 env: ENABLE_LOGS: true + ENABLE_SOROBAN_DIAGNOSTIC_EVENTS: true NETWORK: local - ENABLE_SOROBAN_RPC: true options: >- --health-cmd "curl --no-progress-meter --fail-with-body -X POST \"http://localhost:8000/soroban/rpc\" -H 'Content-Type: application/json' -d '{\"jsonrpc\":\"2.0\",\"id\":8675309,\"method\":\"getNetwork\"}' && curl --no-progress-meter \"http://localhost:8000/friendbot\" | grep '\"invalid_field\": \"addr\"'" --health-interval 10s diff --git a/Cargo.lock b/Cargo.lock index 8f7e21907..36be36040 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -864,16 +864,15 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "ecdsa" -version = "0.16.9" +version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" +checksum = "0997c976637b606099b9985693efa3581e84e41f5c11ba5255f88711058ad428" dependencies = [ "der", "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature 2.2.0", - "spki", + "signature 2.1.0", ] [[package]] @@ -892,7 +891,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ "pkcs8", - "signature 2.2.0", + "signature 2.1.0", ] [[package]] @@ -939,7 +938,6 @@ dependencies = [ "ff", "generic-array", "group", - "pkcs8", "rand_core 0.6.4", "sec1", "subtle", @@ -2402,9 +2400,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "once_cell", "sha2 0.10.8", - "signature 2.2.0", ] [[package]] @@ -2727,6 +2723,18 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2 0.10.8", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2904,6 +2912,15 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro2" version = "1.0.69" @@ -3311,14 +3328,13 @@ dependencies = [ [[package]] name = "sec1" -version = "0.7.3" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "f0aec48e813d6b90b15f0b8948af3c63483992dee44c03e9930b3eebdabe046e" dependencies = [ "base16ct", "der", "generic-array", - "pkcs8", "subtle", "zeroize", ] @@ -3357,12 +3373,12 @@ dependencies = [ [[package]] name = "sep5" -version = "0.0.2" +version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afe34ccbd1fb6fa0b2fc7cccb037bd3d3f1e484c3befe1b713d7611884f336a" +checksum = "0ba64dc259185fdb8dfea7ab0418292743251efba80c9b20e88afc83c17b2593" dependencies = [ "slip10", - "stellar-strkey 0.0.7", + "stellar-strkey 0.0.8", "thiserror", "tiny-bip39", ] @@ -3549,9 +3565,9 @@ checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" [[package]] name = "signature" -version = "2.2.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" +checksum = "5e1788eed21689f9cf370582dfc467ef36ed9c707f073528ddafa8d83e3b8500" dependencies = [ "digest 0.10.7", "rand_core 0.6.4", @@ -3595,9 +3611,9 @@ dependencies = [ [[package]] name = "soroban-builtin-sdk-macros" -version = "20.3.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc32c6e817f3ca269764ec0d7d14da6210b74a5bf14d4e745aa3ee860558900" +checksum = "e1593481b51c9a2a98b0ff60ba2256796d4dfa8005f7ce237257acee175cf48b" dependencies = [ "itertools 0.11.0", "proc-macro2", @@ -3682,9 +3698,9 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "20.3.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c14e18d879c520ff82612eaae0590acaf6a7f3b977407e1abb1c9e31f94c7814" +checksum = "4ff8c73721c0464eb8f0de7893637bd16512d3fe45143b4197b75e298988d67d" dependencies = [ "arbitrary", "crate-git-revision 0.0.6", @@ -3696,13 +3712,14 @@ dependencies = [ "soroban-wasmi", "static_assertions", "stellar-xdr", + "wasmparser 0.116.1", ] [[package]] name = "soroban-env-guest" -version = "20.3.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5122ca2abd5ebcc1e876a96b9b44f87ce0a0e06df8f7c09772ddb58b159b7454" +checksum = "94f39b60d7a8467e52ffb7863efba4b3ea3947aa028af8d88f4f5a76bb2909d8" dependencies = [ "soroban-env-common", "static_assertions", @@ -3710,13 +3727,16 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "20.3.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114a0fa0d0cc39d0be16b1ee35b6e5f4ee0592ddcf459bde69391c02b03cf520" +checksum = "52bd39ea66b834e6e89981affd8b8ba58e450d3964d2a589e1a6a716bca12d77" dependencies = [ "backtrace", "curve25519-dalek 4.1.1", + "ecdsa", "ed25519-dalek 2.0.0", + "elliptic-curve", + "generic-array", "getrandom", "hex-literal", "hmac 0.12.1", @@ -3724,8 +3744,10 @@ dependencies = [ "num-derive", "num-integer", "num-traits", + "p256", "rand", "rand_chacha", + "sec1", "sha2 0.10.8", "sha3", "soroban-builtin-sdk-macros", @@ -3733,13 +3755,14 @@ dependencies = [ "soroban-wasmi", "static_assertions", "stellar-strkey 0.0.8", + "wasmparser 0.116.1", ] [[package]] name = "soroban-env-macros" -version = "20.3.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13e3f8c86f812e0669e78fcb3eae40c385c6a9dd1a4886a1de733230b4fcf27" +checksum = "8fa76ebee7f29000d92792deccee1f670f4048422ad1a35e686a4654fb65f285" dependencies = [ "itertools 0.11.0", "proc-macro2", @@ -3756,9 +3779,9 @@ version = "20.3.4" [[package]] name = "soroban-ledger-snapshot" -version = "20.5.0" +version = "21.0.1-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a54708f44890e0546180db6b4f530e2a88d83b05a9b38a131caa21d005e25a" +checksum = "6b71878a8a3db38d5da6fa42d48d055b7937ef9ae608ffcb23f9589aa7989f10" dependencies = [ "serde", "serde_json", @@ -3770,9 +3793,9 @@ dependencies = [ [[package]] name = "soroban-sdk" -version = "20.5.0" +version = "21.0.1-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84fc8be9068dd4e0212d8b13ad61089ea87e69ac212c262914503a961c8dc3a3" +checksum = "85dc6c199238c4150027034e3cfc383d9c64274292c8dc19bae598e843431356" dependencies = [ "arbitrary", "bytes-lit", @@ -3790,9 +3813,9 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" -version = "20.5.0" +version = "21.0.1-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db20def4ead836663633f58d817d0ed8e1af052c9650a04adf730525af85b964" +checksum = "17c503bf0d43499884aa22877e7f293b19882c2088dcd3f00b01eb21b4c65001" dependencies = [ "crate-git-revision 0.0.6", "darling", @@ -3810,14 +3833,14 @@ dependencies = [ [[package]] name = "soroban-spec" -version = "20.5.0" +version = "21.0.1-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eefeb5d373b43f6828145d00f0c5cc35e96db56a6671ae9614f84beb2711cab" +checksum = "4138300450ad75817954070b1cf32422b236410f937205e9f47e44114fd82fe9" dependencies = [ "base64 0.13.1", "stellar-xdr", "thiserror", - "wasmparser 0.88.0", + "wasmparser 0.116.1", ] [[package]] @@ -3836,9 +3859,9 @@ dependencies = [ [[package]] name = "soroban-spec-rust" -version = "20.5.0" +version = "21.0.1-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3152bca4737ef734ac37fe47b225ee58765c9095970c481a18516a2b287c7a33" +checksum = "2b230255799160fbcf36986f96f506cca671d96541f015546e9f74e99efdedb6" dependencies = [ "prettyplease", "proc-macro2", @@ -3918,9 +3941,9 @@ dependencies = [ [[package]] name = "soroban-token-sdk" -version = "20.5.0" +version = "21.0.1-preview.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8ed0ae2e5d5e67b7939200bba3712b4c81dcf87b2ccd68bba049bec64c780f" +checksum = "a9ac1fe2457ed64e3ba18482b8375264c17340644ea485d0debce129e5cfb50f" dependencies = [ "soroban-sdk", ] @@ -3962,14 +3985,12 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stellar-rpc-client" -version = "20.3.5" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01c98cb5068faa68bb4eae0ddd492752042be3c85df145483669936fd794388e" +checksum = "fefdc91d3cda13e6e324f0c03e42126582b7ff7149da7a0ec792820bb11fb75f" dependencies = [ - "base64 0.21.7", "clap", "ed25519-dalek 2.0.0", - "ethnum", "hex", "http 1.0.0", "itertools 0.10.5", @@ -3989,7 +4010,6 @@ dependencies = [ "thiserror", "tokio", "tracing", - "wasmparser 0.90.0", ] [[package]] @@ -4015,9 +4035,9 @@ dependencies = [ [[package]] name = "stellar-xdr" -version = "20.1.0" +version = "21.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e59cdf3eb4467fb5a4b00b52e7de6dca72f67fac6f9b700f55c95a5d86f09c9d" +checksum = "88e716110d5e050e528820217f84d4667e166ced841ba48d074152d4ad4ab884" dependencies = [ "arbitrary", "base64 0.13.1", @@ -4808,20 +4828,21 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.88.0" +version = "0.90.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" +checksum = "b62c8d843f4423efee314dc75a1049886deba3214f7e7f9ff0e4e58b4d618581" dependencies = [ "indexmap 1.9.3", ] [[package]] name = "wasmparser" -version = "0.90.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62c8d843f4423efee314dc75a1049886deba3214f7e7f9ff0e4e58b4d618581" +checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.2.3", + "semver", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 7e5558c19..839dce2a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,16 +14,16 @@ version = "20.3.4" rust-version = "1.74.0" [workspace.dependencies.soroban-env-host] -version = "=20.3.0" +version = "=21.0.1" [workspace.dependencies.soroban-simulation] -version = "=20.3.0" +version = "=21.0.1-preview.1" [workspace.dependencies.soroban-spec] -version = "=20.5.0" +version = "=21.0.1-preview.1" [workspace.dependencies.soroban-spec-rust] -version = "=20.5.0" +version = "=21.0.1-preview.1" [workspace.dependencies.soroban-spec-json] version = "=20.3.4" @@ -38,13 +38,13 @@ version = "20.3.4" path = "./cmd/crates/soroban-spec-tools" [workspace.dependencies.soroban-sdk] -version = "=20.5.0" +version = "=21.0.1-preview.1" [workspace.dependencies.soroban-token-sdk] -version = "=20.5.0" +version = "=21.0.1-preview.1" [workspace.dependencies.soroban-ledger-snapshot] -version = "=20.5.0" +version = "=21.0.1-preview.1" [workspace.dependencies.soroban-cli] version = "=20.3.4" @@ -52,15 +52,15 @@ path = "cmd/soroban-cli" [workspace.dependencies.soroban-rpc] package = "stellar-rpc-client" -version = "=20.3.5" +version = "=21.0.1" [workspace.dependencies.stellar-xdr] -version = "=20.1.0" +version = "=21.0.1" default-features = true [workspace.dependencies] stellar-strkey = "0.0.8" -sep5 = "0.0.2" +sep5 = "0.0.3" base64 = "0.21.2" thiserror = "1.0.46" sha2 = "0.10.7" diff --git a/docs/soroban-cli-full-docs.md b/docs/soroban-cli-full-docs.md index 9c493761b..68b9adc98 100644 --- a/docs/soroban-cli-full-docs.md +++ b/docs/soroban-cli-full-docs.md @@ -1506,7 +1506,7 @@ Decode XDR Default value: `json` - Possible values: `json`, `json-formatted` + Possible values: `json`, `json-formatted`, `rust-debug`, `rust-debug-formatted`