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

Add HTTP Deprecation header to legacy REST endpoints #7636

Closed
aaronc opened this issue Oct 22, 2020 · 2 comments · Fixed by #7686
Closed

Add HTTP Deprecation header to legacy REST endpoints #7636

aaronc opened this issue Oct 22, 2020 · 2 comments · Fixed by #7686
Assignees

Comments

@aaronc
Copy link
Member

aaronc commented Oct 22, 2020

This will make it easier for users transitioning to stargate. The header should link to documentation on upgrading.

See https://tools.ietf.org/id/draft-dalal-deprecation-header-01.html

We may additionally want to consider Sunset (https://tools.ietf.org/html/rfc8594) and or Warning (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Warning) headers.

@clevinson
Copy link
Contributor

clevinson commented Oct 22, 2020

Does deprecation imply that an endpoint currently functions as expected? I ask because I don't think this is the case for all endpoints (particularly the GET /txs endpoint). In my understanding (from this discord thread), we actually do break client expectations here, in that GET /txs/TX_HASH will not work for any transactions created with SIGN_MODE_DIRECT, namely all tx's created via CLI.

I wonder if we need (separately from this issue), a better solution to the above problem. Or at least we should make sure to be explicit in our documentation about what we mean by deprecated here.

Update: Added #7639 to track this

@alexanderbez
Copy link
Contributor

Does deprecation imply that an endpoint currently functions as expected?

Yes, specifically the functionality remains unchanged and non-breaking. However, this is specific to a given context. Namely, yes, the endpoints will work as expected assuming you work with legacy data (e.g. amino-encoded txs). If you attempt to use this endpoint with data built upon new functionality, you really don't get any guarantees towards backwards compatibility.

In such a case, explorers should use these endpoints wisely, where they should strive to use the new endpoints where possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants