From 9504b85b8e0f7522e636400f1332254c314a9b03 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Thu, 16 May 2024 14:57:55 +0200 Subject: [PATCH] Bump Core version to 21.0.0rc2 --- .github/workflows/soroban-rpc.yml | 8 +++---- .../internal/test/docker-compose.yml | 2 +- .../internal/test/get_fee_stats_test.go | 22 +++++++++++++++++++ 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.github/workflows/soroban-rpc.yml b/.github/workflows/soroban-rpc.yml index 2aeb9e8d..6937a369 100644 --- a/.github/workflows/soroban-rpc.yml +++ b/.github/workflows/soroban-rpc.yml @@ -113,10 +113,10 @@ jobs: SOROBAN_RPC_INTEGRATION_TESTS_ENABLED: true SOROBAN_RPC_INTEGRATION_TESTS_CORE_MAX_SUPPORTED_PROTOCOL: ${{ matrix.protocol-version }} SOROBAN_RPC_INTEGRATION_TESTS_CAPTIVE_CORE_BIN: /usr/bin/stellar-core - PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 21.0.0-1812.rc1.a10329cca.focal - PROTOCOL_20_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:21.0.0-1812.rc1.a10329cca.focal - PROTOCOL_21_CORE_DEBIAN_PKG_VERSION: 21.0.0-1812.rc1.a10329cca.focal - PROTOCOL_21_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:21.0.0-1812.rc1.a10329cca.focal + PROTOCOL_20_CORE_DEBIAN_PKG_VERSION: 21.0.0-1865.rc2.c6f474133.focal + PROTOCOL_20_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:21.0.0-1865.rc2.c6f474133.focal + PROTOCOL_21_CORE_DEBIAN_PKG_VERSION: 21.0.0-1865.rc2.c6f474133.focal + PROTOCOL_21_CORE_DOCKER_IMG: stellar/unsafe-stellar-core:21.0.0-1865.rc2.c6f474133.focal steps: - uses: actions/checkout@v3 with: diff --git a/cmd/soroban-rpc/internal/test/docker-compose.yml b/cmd/soroban-rpc/internal/test/docker-compose.yml index afe214a9..ebb41af6 100644 --- a/cmd/soroban-rpc/internal/test/docker-compose.yml +++ b/cmd/soroban-rpc/internal/test/docker-compose.yml @@ -15,7 +15,7 @@ services: # Note: Please keep the image pinned to an immutable tag matching the Captive Core version. # This avoids implicit updates which break compatibility between # the Core container and captive core. - image: ${CORE_IMAGE:-stellar/unsafe-stellar-core:20.4.1-1807.b152dc51d.focal} + image: ${CORE_IMAGE:-stellar/stellar-core:21.0.0-1865.rc2.c6f474133.focal} depends_on: - core-postgres restart: on-failure diff --git a/cmd/soroban-rpc/internal/test/get_fee_stats_test.go b/cmd/soroban-rpc/internal/test/get_fee_stats_test.go index 310bddbe..51701b4a 100644 --- a/cmd/soroban-rpc/internal/test/get_fee_stats_test.go +++ b/cmd/soroban-rpc/internal/test/get_fee_stats_test.go @@ -6,6 +6,7 @@ import ( "github.com/creachadair/jrpc2" "github.com/creachadair/jrpc2/jhttp" +<<<<<<< Updated upstream "github.com/stellar/go/keypair" "github.com/stellar/go/txnbuild" "github.com/stellar/go/xdr" @@ -16,11 +17,21 @@ import ( ) func TestGetFeeStats(t *testing.T) { +======= + "github.com/stretchr/testify/assert" + + "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/ledgerbucketwindow" + "github.com/stellar/soroban-rpc/cmd/soroban-rpc/internal/methods" +) + +func TestHealth(t *testing.T) { +>>>>>>> Stashed changes test := NewTest(t, nil) ch := jhttp.NewChannel(test.sorobanRPCURL(), nil) client := jrpc2.NewClient(ch, nil) +<<<<<<< Updated upstream sourceAccount := keypair.Root(StandaloneNetworkPassphrase) address := sourceAccount.Address() account := txnbuild.NewSimpleAccount(address, 0) @@ -119,4 +130,15 @@ func TestGetFeeStats(t *testing.T) { assert.Greater(t, result.InclusionFee.LedgerCount, uint32(0)) assert.Greater(t, result.SorobanInclusionFee.LedgerCount, uint32(0)) assert.Greater(t, result.LatestLedger, uint32(0)) +======= + var result methods.HealthCheckResult + if err := client.CallResult(context.Background(), "getHealth", nil, &result); err != nil { + t.Fatalf("rpc call failed: %v", err) + } + assert.Equal(t, "healthy", result.Status) + assert.Equal(t, uint32(ledgerbucketwindow.DefaultEventLedgerRetentionWindow), result.LedgerRetentionWindow) + assert.Greater(t, result.OldestLedger, uint32(0)) + assert.Greater(t, result.LatestLedger, uint32(0)) + assert.GreaterOrEqual(t, result.LatestLedger, result.OldestLedger) +>>>>>>> Stashed changes }