Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change NewSeq back to int64 in horizon response. #1616

Merged
merged 2 commits into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion protocols/horizon/effects/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
15 changes: 11 additions & 4 deletions services/horizon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,24 @@ 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.
* Add experimental path finding endpoints which use an in memory order book for improved performance. To enable the endpoints set `--enable-experimental-ingestion` CLI param or `ENABLE_EXPERIMENTAL_INGESTION=true` env variable. Note that the `enable-experimental-ingestion` flag enables both the new path finding endpoints and the accounts for signer endpoint. There are two path finding endpoints. `/paths/strict-send` returns payment paths where both the source and destination assets are fixed. This endpoint is able to answer questions like: "Get me the most EUR possible for my 10 USD." `/paths/strict-receive` is the other endpoint which is an alias to the existing `/paths` endpoint.
* `--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

* 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.
Expand Down
9 changes: 0 additions & 9 deletions services/horizon/internal/actions_operation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down