From f2466b519bba338902553229556d245579c527d9 Mon Sep 17 00:00:00 2001 From: Adolfo Builes Date: Tue, 20 Aug 2019 13:59:51 -0500 Subject: [PATCH 1/2] Change NewSeq back to int64 in horizon response. --- protocols/horizon/effects/main.go | 2 +- services/horizon/CHANGELOG.md | 5 +---- services/horizon/internal/actions_operation_test.go | 9 --------- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/protocols/horizon/effects/main.go b/protocols/horizon/effects/main.go index aa3595a5e8..3fa472bc8d 100644 --- a/protocols/horizon/effects/main.go +++ b/protocols/horizon/effects/main.go @@ -198,7 +198,7 @@ type AccountFlagsUpdated struct { type SequenceBumped struct { Base - NewSeq int64 `json:"new_seq,string"` + NewSeq int64 `json:"new_seq"` } type SignerCreated struct { diff --git a/services/horizon/CHANGELOG.md b/services/horizon/CHANGELOG.md index a2a2238272..d2eca9a9ab 100644 --- a/services/horizon/CHANGELOG.md +++ b/services/horizon/CHANGELOG.md @@ -8,10 +8,6 @@ bumps. A breaking change will get clearly notified in this log. ## v0.20.0 -### Breaking changes - -- `new_seq` field in `/effects` is now a String [#1604](https://github.com/stellar/go/pull/1604). - ### Changes * Experimental ingestion system is now run concurrently on all Horizon servers (with feature flag set - see below). This improves ingestion availability. @@ -19,6 +15,7 @@ bumps. A breaking change will get clearly notified in this log. * `--enable-accounts-for-signer` CLI param or `ENABLE_ACCOUNTS_FOR_SIGNER=true` env variable are merged with `--enable-experimental-ingestion` CLI param or `ENABLE_EXPERIMENTAL_INGESTION=true` env variable. * Add experimental get offers by id endpoint`/offers/{id}` which uses the new ingestion system to fill up the offers table. To enable it, set `--enable-experimental-ingestion` CLI param or `ENABLE_EXPERIMENTAL_INGESTION=true` env variable. + ## v0.19.0 * Add `join` parameter to operations and payments endpoints. Currently, the only valid value for the parameter is `transactions`. If `join=transactions` is included in a request then the response will include a `transaction` field for each operation in the response. diff --git a/services/horizon/internal/actions_operation_test.go b/services/horizon/internal/actions_operation_test.go index ba6194c084..3e9c0ee18f 100644 --- a/services/horizon/internal/actions_operation_test.go +++ b/services/horizon/internal/actions_operation_test.go @@ -322,15 +322,6 @@ func TestOperationEffect_BumpSequence(t *testing.T) { var result []effects.SequenceBumped ht.UnmarshalPage(w.Body, &result) ht.Assert.Equal(int64(300000000000), result[0].NewSeq) - - data, err := json.Marshal(&result[0]) - ht.Assert.NoError(err) - effect := struct { - NewSeq string `json:"new_seq"` - }{} - - json.Unmarshal(data, &effect) - ht.Assert.Equal("300000000000", effect.NewSeq) } } From 2e5417ba97ddb85ef2d2ad537f04996251e5ef8e Mon Sep 17 00:00:00 2001 From: Adolfo Builes Date: Tue, 20 Aug 2019 15:11:16 -0500 Subject: [PATCH 2/2] Add schedule breaking changes. --- services/horizon/CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/horizon/CHANGELOG.md b/services/horizon/CHANGELOG.md index d2eca9a9ab..50d3039c7a 100644 --- a/services/horizon/CHANGELOG.md +++ b/services/horizon/CHANGELOG.md @@ -15,6 +15,16 @@ bumps. A breaking change will get clearly notified in this log. * `--enable-accounts-for-signer` CLI param or `ENABLE_ACCOUNTS_FOR_SIGNER=true` env variable are merged with `--enable-experimental-ingestion` CLI param or `ENABLE_EXPERIMENTAL_INGESTION=true` env variable. * Add experimental get offers by id endpoint`/offers/{id}` which uses the new ingestion system to fill up the offers table. To enable it, set `--enable-experimental-ingestion` CLI param or `ENABLE_EXPERIMENTAL_INGESTION=true` env variable. +### Scheduled Breaking Changes + +The type for the following attributes will be changed from `int64` to `string` in the upcoming `0.22` release. + +- Attribute `offer_id` in [manage buy offer](https://www.stellar.org/developers/horizon/reference/resources/operation.html#manage-buy-offer) and [manage sell offer](https://www.stellar.org/developers/horizon/reference/resources/operation.html#manage-sell-offer) operations. +- Attribute `offer_id` in `Trade` effect. +- Attribute `id` in [Offer](https://www.stellar.org/developers/horizon/reference/resources/offer.html) resource. +- Attribute `timestamp` and `trade_count` in [Trade Aggregation](https://www.stellar.org/developers/horizon/reference/resources/trade_aggregation.html) resource. + +If you are an SDK maintainer, update your code to prepare for this change. ## v0.19.0