Skip to content

Commit 1a299b8

Browse files
authored
Merge pull request #213 from stellar/protocol-next
2 parents c9e78eb + dd217cd commit 1a299b8

14 files changed

Lines changed: 107 additions & 28 deletions

File tree

.github/workflows/horizon-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: Run deprecation tests
1414
shell: bash
1515
run: |
16-
export VERSION=${GITHUB_REF_NAME#horizon-v}
16+
export VERSION=${GITHUB_REF_NAME#v}
1717
echo "Searching for \"Action needed in release ${VERSION}\" tags..."
1818
# Negate the result so process exits with 1 if anything found
1919
! egrep -irn -A 1 --include=*.go "Action.+needed.+in.+release:.+$VERSION" ./

.github/workflows/horizon.yml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,44 @@ on:
66
pull_request:
77

88
jobs:
9-
integration-p26-pkg:
10-
name: Integration tests (P26)
9+
integration-p27-pkg:
10+
name: Integration tests (P27)
1111
uses: ./.github/workflows/integration-tests.yml
1212
with:
13-
protocol_version: '26'
14-
core_deb_version: '27.1.0-3365.3589a696b.jammy~buildtests'
15-
core_docker_img: 'stellar/stellar-core:27.1.0-3365.3589a696b.jammy'
16-
stellar_rpc_docker_img: 'stellar/stellar-rpc:27.1.0'
13+
protocol_version: '27'
14+
# The P27 leg runs the NEW core and rpc builds at protocol 27 — the point
15+
# is verifying the updated binaries still serve the previous protocol
16+
# (the real configuration during the upgrade window), not re-testing
17+
# already-shipped versions against each other.
18+
core_deb_version: '28.0.0-3486.2332980a1.jammy~buildtests'
19+
core_docker_img: 'stellar/unsafe-stellar-core:28.0.0-3486.2332980a1.jammy'
20+
stellar_rpc_docker_img: 'stellar/stellar-rpc:28.0.0-vnext-200'
1721
full_matrix: true
1822

19-
integration-p27-pkg:
20-
name: Integration tests (P27)
23+
integration-p28-pkg:
24+
name: Integration tests (P28)
2125
uses: ./.github/workflows/integration-tests.yml
2226
with:
23-
protocol_version: '27'
24-
core_deb_version: '27.1.0-3365.3589a696b.jammy~buildtests'
25-
core_docker_img: 'stellar/stellar-core:27.1.0-3365.3589a696b.jammy'
26-
stellar_rpc_docker_img: 'stellar/stellar-rpc:27.1.0'
27+
protocol_version: '28'
28+
core_deb_version: '28.0.0-3486.2332980a1.jammy~buildtests'
29+
core_docker_img: 'stellar/unsafe-stellar-core:28.0.0-3486.2332980a1.jammy'
30+
stellar_rpc_docker_img: 'stellar/stellar-rpc:28.0.0-vnext-200'
2731
full_matrix: true
2832

29-
# integration-p27-src:
30-
# name: Integration tests (P27, core from source)
33+
# integration-p28-src:
34+
# name: Integration tests (P28, core from source)
3135
# uses: ./.github/workflows/integration-tests.yml
3236
# with:
33-
# protocol_version: '27'
37+
# protocol_version: '28'
3438
# core_git_ref: 'master'
35-
# stellar_rpc_docker_img: 'stellar/stellar-rpc:27.0.0-preview-190'
39+
# stellar_rpc_docker_img: 'stellar/stellar-rpc:28.0.0-vnext-200'
3640

3741
verify-range:
3842
name: Test (and push) verify-range image
3943
runs-on: ubuntu-24.04
4044
env:
4145
GO_VERSION: 1.25.0
42-
STELLAR_CORE_VERSION: 27.1.0-3365.3589a696b.noble
46+
STELLAR_CORE_VERSION: 28.0.0-3486.2332980a1.noble
4347
steps:
4448
- uses: actions/checkout@v3
4549
with:
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Release readiness
2+
3+
# Validates that empty placeholder pins in `horizon.yml` get flipped to real
4+
# values before a protocol-next branch is merged to a stable branch. Pairs
5+
# with the AMBER-skip in `internal/test/integration/integration.go`: tests
6+
# skip silently when their image env-var is empty (acceptable on
7+
# protocol-next while waiting for the new-protocol image to publish), and
8+
# this check makes sure that temporary state can't reach `main` undetected.
9+
10+
on:
11+
pull_request:
12+
push:
13+
branches: [main, master, protocol-next]
14+
15+
jobs:
16+
no-empty-rpc-image-pins:
17+
name: No empty PROTOCOL_*_STELLAR_RPC_DOCKER_IMG values
18+
runs-on: ubuntu-24.04
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
ref: ${{ github.event.pull_request.head.sha || github.ref }}
23+
24+
- name: Check horizon.yml for empty RPC image pins
25+
env:
26+
# Branches where empty pins are a hard failure. Any other target
27+
# (typically protocol-next) gets a yellow-warning annotation but
28+
# still passes the check.
29+
STABLE_BRANCHES: 'main master'
30+
run: |
31+
set -e
32+
33+
# Match `PROTOCOL_<N>_STELLAR_RPC_DOCKER_IMG:` followed by either an
34+
# empty quoted string or nothing-then-end-of-line. The leading
35+
# whitespace anchor avoids matching the var name inside a comment.
36+
empty=$(grep -nE '^[[:space:]]+PROTOCOL_[0-9]+_STELLAR_RPC_DOCKER_IMG:[[:space:]]*("[[:space:]]*"|$)' \
37+
.github/workflows/horizon.yml || true)
38+
39+
if [ -z "$empty" ]; then
40+
echo "All PROTOCOL_*_STELLAR_RPC_DOCKER_IMG values in horizon.yml are set."
41+
exit 0
42+
fi
43+
44+
# Resolve the effective target branch:
45+
# - On a PR: github.base_ref is the destination branch ("main"/etc.)
46+
# - On a push: github.ref_name is the branch being pushed
47+
target="${{ github.base_ref || github.ref_name }}"
48+
49+
echo "Empty PROTOCOL_*_STELLAR_RPC_DOCKER_IMG entries found:"
50+
echo "$empty"
51+
echo
52+
53+
if echo "$STABLE_BRANCHES" | grep -qw "$target"; then
54+
echo "::error::Empty PROTOCOL_*_STELLAR_RPC_DOCKER_IMG values are not allowed when targeting '$target'."
55+
echo "Every matrix leg must point at a real stellar-rpc image before merging to a stable branch."
56+
echo "If a P{N} stellar-rpc image is not published yet, the protocol-next branch is not ready to merge."
57+
exit 1
58+
else
59+
echo "::warning::Empty PROTOCOL_*_STELLAR_RPC_DOCKER_IMG entries on '$target' are expected during a protocol-next transition."
60+
echo "Flip these to real image refs before opening a PR to a stable branch (main/master)."
61+
exit 0
62+
fi

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
All notable changes to this project will be documented in this
44
file. This project adheres to [Semantic Versioning](http://semver.org/).
55

6-
## Unreleased
6+
## 28.0.0
7+
8+
**This release adds support for Protocol 28.**
9+
10+
### Added
11+
- Added Protocol 28 (CAP-0085) ingestion support: decode of the new `ContractExecutable` external-reference variant and the `SCV_EXECUTABLE_TAG` `SCVal` arm, delivered via the regenerated `go-stellar-sdk` XDR ([go-stellar-sdk#5965](https://github.com/stellar/go-stellar-sdk/pull/5965)) ([#207](https://github.com/stellar/stellar-horizon/pull/207)). `MaxSupportedProtocolVersion` is already 28, so no bump is required.
12+
- `TestCoreLCMIngestion` now covers CAP-0085 via a captured `LedgerCloseMeta` fixture (`create_and_invoke_external_ref_contract`) from stellar-core's CAP-85 host tests ([stellar-core#5358](https://github.com/stellar/stellar-core/pull/5358)).
713

814
## 27.0.0
915

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ require (
4848
require (
4949
github.com/creachadair/jrpc2 v1.2.0
5050
github.com/fsouza/fake-gcs-server v1.49.2
51-
github.com/stellar/go-stellar-sdk v0.6.0
51+
github.com/stellar/go-stellar-sdk v0.7.0
5252
)
5353

5454
require (

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
429429
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
430430
github.com/spf13/viper v1.17.0 h1:I5txKw7MJasPL/BrfkbA0Jyo/oELqVmux4pR/UxOMfI=
431431
github.com/spf13/viper v1.17.0/go.mod h1:BmMMMLQXSbcHK6KAOiFLz0l5JHrU89OdIRHvsk0+yVI=
432-
github.com/stellar/go-stellar-sdk v0.6.0 h1:NM2oqZJQup0QxnJMq6C8s4iIIhU6rHFX0rlsF3wh/Ho=
433-
github.com/stellar/go-stellar-sdk v0.6.0/go.mod h1:IkcqcrE9UQi7n/1y+MxKB+7qzdjG1T2kGOD7Ss8dqjw=
432+
github.com/stellar/go-stellar-sdk v0.7.0 h1:nzEOPA+OdRKKKnBdDAZfgrs7s3cLVST8dC1umJ4vSaU=
433+
github.com/stellar/go-stellar-sdk v0.7.0/go.mod h1:IkcqcrE9UQi7n/1y+MxKB+7qzdjG1T2kGOD7Ss8dqjw=
434434
github.com/stellar/go-xdr v0.0.0-20260529210834-0bf8f4956364 h1:gOKrfuWdZ92LFlv0TAwgZ7OsWKeBsOMDlGLyFgduI1w=
435435
github.com/stellar/go-xdr v0.0.0-20260529210834-0bf8f4956364/go.mod h1:If+U9Z1W5xU97VrOgJandQT+2dN7/iOpkCrxBJEyF80=
436436
github.com/stellar/throttled v2.2.3-0.20190823235211-89d75816f59d+incompatible h1:jMXXAcz6xTarGDQ4VtVbtERogcmDQw4RaE85Cr9CgoQ=

internal/ingest/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535
const (
3636
// MaxSupportedProtocolVersion defines the maximum supported version of
3737
// the Stellar protocol.
38-
MaxSupportedProtocolVersion uint32 = 27
38+
MaxSupportedProtocolVersion uint32 = 28
3939

4040
// CurrentVersion reflects the latest version of the ingestion
4141
// algorithm. This value is stored in KV store and is used to decide
@@ -706,7 +706,7 @@ func (s *system) LoadTest(ledgersFilePath, fixturesFilePath string, merge bool,
706706
// 4. Set up loadtest backend and run FSM
707707
config := loadtest.LedgerBackendConfig{
708708
NetworkPassphrase: s.config.NetworkPassphrase,
709-
LedgersFilePath: ledgersFilePath,
709+
LedgersFilePaths: []string{ledgersFilePath},
710710
LedgerCloseDuration: closeDuration,
711711
}
712712
if merge {
Binary file not shown.

internal/ingest/testdata/test-lcms/InvokeHostFunctionTests/index.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@
405405
"9c99d2135d9d7d77" : "archival_meta-protocol_version_26-persistent_entry_meta-restore_expired_but_not_evicted-restore,_update_value_in_next_tx-same_stage",
406406
"9cbd66b8c4018c16" : "Soroban_authorization-classic_account_with_weights-deep_tree-failure_for_tree_with_missing_node",
407407
"9ccccec1202f5b81" : "resource_fee_exceeds_uint32-self_fee_bump-failure-fee_bump_fee_is_not_sufficient_to_cover_the_resource_fee_with_high_inclusion_fee",
408+
"9de1ea718b77ffa2" : "create_and_invoke_external_ref_contract",
408409
"9e44fefde737f8bc" : "contract_storage-protocol_version_26-footprint-RO_footprint_for_RW_entry",
409410
"9e7d59169e4ded64" : "Soroban_classic_account_authentication-account_with_weights_and_additional_signer-wrong_key_type",
410411
"9e81b4f36cfd3af7" : "Soroban_footprint_validation-restoreOp-invalid_readOnly_keys-invalid_asset_7",

internal/integration/ingestion_load_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,13 @@ func TestLoadTestLedgerBackend(t *testing.T) {
6969

7070
replayConfig := loadtest.LedgerBackendConfig{
7171
NetworkPassphrase: "invalid passphrase",
72-
LedgersFilePath: filepath.Join("testdata", fmt.Sprintf("load-test-ledgers-v%d.xdr.zstd", itest.Config().ProtocolVersion)),
72+
LedgersFilePaths: []string{filepath.Join("testdata", fmt.Sprintf("load-test-ledgers-v%d.xdr.zstd", itest.Config().ProtocolVersion))},
7373
LedgerCloseDuration: 3 * time.Second / 2,
7474
LedgerBackend: newCaptiveCore(itest),
7575
}
7676
var generatedLedgers []xdr.LedgerCloseMeta
7777

78-
readFile(t, replayConfig.LedgersFilePath,
78+
readFile(t, replayConfig.LedgersFilePaths[0],
7979
func() *xdr.LedgerCloseMeta { return &xdr.LedgerCloseMeta{} },
8080
func(ledger *xdr.LedgerCloseMeta) {
8181
generatedLedgers = append(generatedLedgers, *ledger)
@@ -204,12 +204,12 @@ func TestLoadTestLedgerBackendWithoutMerge(t *testing.T) {
204204
fixturePassphrase := loadTestNetworkPassphraseFor(horizoningest.MaxSupportedProtocolVersion)
205205
replayConfig := loadtest.LedgerBackendConfig{
206206
NetworkPassphrase: "invalid passphrase",
207-
LedgersFilePath: filepath.Join("testdata", fmt.Sprintf("load-test-ledgers-v%d.xdr.zstd", horizoningest.MaxSupportedProtocolVersion)),
207+
LedgersFilePaths: []string{filepath.Join("testdata", fmt.Sprintf("load-test-ledgers-v%d.xdr.zstd", horizoningest.MaxSupportedProtocolVersion))},
208208
LedgerCloseDuration: 3 * time.Second / 2,
209209
}
210210
var generatedLedgers []xdr.LedgerCloseMeta
211211

212-
readFile(t, replayConfig.LedgersFilePath,
212+
readFile(t, replayConfig.LedgersFilePaths[0],
213213
func() *xdr.LedgerCloseMeta { return &xdr.LedgerCloseMeta{} },
214214
func(ledger *xdr.LedgerCloseMeta) {
215215
generatedLedgers = append(generatedLedgers, *ledger)

0 commit comments

Comments
 (0)