-
Notifications
You must be signed in to change notification settings - Fork 502
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
Report right protocol version in horizon root path #783
Report right protocol version in horizon root path #783
Conversation
e1305ce
to
ac60d66
Compare
@charlie-wasp thanks for this! Can you bring your branch up to date with master? That'll fix the build issue this PR is hitting. |
ac60d66
to
f6ea0bf
Compare
@tomquisel done! ✅ |
Because of the concerns in stellar/stellar-core#1740 I think we can try to make it by introducing new fields with unambiguous names and deprecating existing
Then in the next minor release (we should really start following semver...) we will remove |
@bartekn 👌 I'll give it a shot |
919fad8
to
f85e4c6
Compare
@bartekn @tomquisel I added new fields and updated the branch. And seemingly nothing is broken 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I switched the base to horizon v0.16.0. @bartekn can you do a final sign off & merge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just 3 very small issues. Thank you so much for this PR!
services/horizon/internal/app.go
Outdated
redis *redis.Pool | ||
coreVersion string | ||
horizonVersion string | ||
protocolVersion int32 // will be deprecated in the next minor release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not part of the public API, can be removed right away.
@@ -18,6 +18,7 @@ func PopulateRoot( | |||
hVersion, cVersion string, | |||
passphrase string, | |||
pVersion int32, | |||
coreProtocolVersion int32, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change these names to currentProtocolVersion
and coreSupportedProtocolVersion
. Will be less confusing.
protocols/horizon/main.go
Outdated
HistoryElderSequence int32 `json:"history_elder_ledger"` | ||
CoreSequence int32 `json:"core_latest_ledger"` | ||
NetworkPassphrase string `json:"network_passphrase"` | ||
ProtocolVersion int32 `json:"protocol_version"` // will be deprecated in the next minor release |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change this to:
// Deprecated - remove in: horizon-v0.17.0
ProtocolVersion int32 `json:"protocol_version"` ProtocolVersion
to support #833. This will help us automatically detect deprecations.
6806aa5
to
2d57fb0
Compare
@bartekn done! ✅ Thank you for the review! |
66feb30
to
0d43840
Compare
979f966
to
e47de18
Compare
LGTM! Added small changes in e47de18. |
* tag 'horizon-v0.16.0': horizon: 0.16.0 CHANGELOG (stellar#851) Allow smooth migration for failed transactions column (stellar#847) Clean up the redundancy in the Horizon command line option handling (stellar#834) horizon/actions: fix a bug in `GetPageQuery` and `GetAddress` (stellar#846) remove JSON horizon/actions: check hash before sending an event to the stream of orderbook (stellar#828) Deprecated check (stellar#838) Report right protocol version in horizon root path (stellar#783) fix migration ordering (stellar#821) Add failed transactions to ledger resource (stellar#756) Ignore "0" trades effects (stellar#791) Add package index to README (stellar#831) horizon/db2/history: optimize account queries for payments and operations (stellar#829) Update "gap detected" message (stellar#830) Update setTickInProgress comment (stellar#824) Bump postgres version for Travis (stellar#822) fix wrong effect of a circular path payment (stellar#807) Update README.md (stellar#820) Fix build badge (stellar#816) Require migration to run Horizon version successfully (fixes stellar#778) (stellar#808)
Addresses #580
As stated in stellar/stellar-core#1740, I take here current protocol version from the
ledger.version
attribute of stellar-core info command responseI am a quite newbie in both Stellar and Go, so I will appreciate any comments, which help me improve this PR 🙏