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

protocols/horizon: Remove deprecated API fields #5438

Open
Tracked by #5433
Shaptic opened this issue Aug 20, 2024 · 1 comment
Open
Tracked by #5433

protocols/horizon: Remove deprecated API fields #5438

Shaptic opened this issue Aug 20, 2024 · 1 comment

Comments

@Shaptic
Copy link
Contributor

Shaptic commented Aug 20, 2024

Epic: #5433


There are several API fields that have been deprecated for a very long time. We should remove them as part of the Protocol 22 release in which we will change to the protocol-specific versioning scheme (i.e. horizon-v22.0.0).

The following API fields are deprecated:

  • In /assets, the num_accounts and amount fields:

// Action needed in release: horizon-v3.0.0: deprecated field
NumAccounts int32 `json:"num_accounts"`
NumClaimableBalances int32 `json:"num_claimable_balances"`
NumLiquidityPools int32 `json:"num_liquidity_pools"`
NumContracts int32 `json:"num_contracts"`
NumArchivedContracts int32 `json:"num_archived_contracts"`
// Action needed in release: horizon-v3.0.0: deprecated field
Amount string `json:"amount"`

  • In /transactions/:id (or any paginating variant), the valid_before and valid_after fields, because users should instead check the transaction's preconditions which can have way more than time bounds:

// Action needed in release: horizon-v3.0.0: remove valid_(after|before)
ValidAfter string `json:"valid_after,omitempty"`
ValidBefore string `json:"valid_before,omitempty"`

@Shaptic Shaptic added breaking-change Breaking change tag Protocol 22 labels Aug 20, 2024
@Shaptic Shaptic added this to the platform sprint 50 milestone Aug 20, 2024
@Shaptic Shaptic self-assigned this Aug 27, 2024
@Shaptic Shaptic removed their assignment Sep 17, 2024
@sreuland
Copy link
Contributor

should this effort include a coordinated outreach/blast to sdk's for notice? a separate ticket for cleanup of the same in js-sdk?

@sreuland sreuland self-assigned this Sep 17, 2024
karthikiyer56 added a commit that referenced this issue Oct 2, 2024
* Update .gitignore to ignore bucket-cache/ at any level

* clean up all occurences of Amount and NumAccounts (#5438)

* Cleanup validAfter and validBefore

* Remove unused fn

* Update fixture

* SQL to drop columns for protocol 22 release

* Remove amount and num_accounts from ExpAssetStats table and test fixtures

* Remoce extra space in sql migration file. Generate bindata.go with gogenerate.sh

* Update code to show only authorized accounts and balances in ticker service

* Fix tests in ticker

* Updated CHANGELOG.md to include breaking changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants