-
Notifications
You must be signed in to change notification settings - Fork 501
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
all: Implement CAP 27 and SEP 23 #2471
Conversation
6a47722
to
c429e16
Compare
493a1b7
to
419cceb
Compare
1dc404e
to
8de9cc1
Compare
Guide to reviewers: I would mainly focus on the |
services/horizon/internal/expingest/processors/participants_processor.go
Show resolved
Hide resolved
services/horizon/internal/expingest/processors/operations_processor.go
Outdated
Show resolved
Hide resolved
services/horizon/internal/expingest/processors/effects_processor.go
Outdated
Show resolved
Hide resolved
@2opremio I checked out your branch and searched for all cases where In the following cases I think we should be converting the
I also found one case in txsub where we should be converting a In this case we do a db lookup by account address and since we don't store -- This requirement from issue #2365 is not addressed by your PR:
To fix this, you should also update -- For all of these cases that you fixed can you also add tests? |
In a Nutshell: 1. The ingestion code will simply transformed MuxedAccounts into AccountIds (by dropping the memo ID). This means that queries will only show AccountId G-strkeys. 2. The `POST transaction` endpoint will accept transactions using CAP27s XDR, so clients need to be adapted to that.
I couldn't add tests because Transaction.Build() doesn't allow using muxed accounts as input
8866097
to
d038322
Compare
81f881f
to
149fd9a
Compare
Also, make sure only G-addresses can be used to create an effect
e5d6e72
to
5fbe8e6
Compare
@tamirms I think I have addressed everything, PTAL |
build/util.go
Outdated
} | ||
|
||
if m == nil { | ||
return errors.New("aid is nil in setAccountId") |
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.
return errors.New("aid is nil in setMuxedAccount")
@@ -449,6 +449,18 @@ func ReadChallengeTx(challengeTx, serverAccountID, network string) (tx Transacti | |||
if err != nil { | |||
return tx, clientAccountID, err | |||
} | |||
|
|||
// Enforce no muxed accounts (at least until we understand their impact) | |||
muxedAccountErr := errors.New("muxed accounts are not allowed in challenge transactions") |
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 add a test which exercises this failure mode?
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.
I tried, but I I don't think it makes sense, see d68fe75
I couldn't add tests because Transaction.Build() doesn't
allow using muxed accounts as input
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.
@2opremio this looks great! I found 2 small issues. Once those are fixed we can merge
@2opremio can you reopen the pr and target it to the horizon 1.2.0 release branch. I meant to retarget your PR earlier but I forgot about it. Unfortunately, I cannot push your commit onto the release branch without going through a PR because it is write protected |
I cannot reopen it, I will need to create a separate PR. I will do that. |
Error was "shift count type int, must be unsigned integer". This issue got introduced in stellar#2471
PR Checklist
PR Structure
otherwise).
services/friendbot
, orall
ordoc
if the changes are broad or impact manypackages.
Thoroughness
.md
files, etc... affected by this change). Take a look in the
docs
folder for a given service,like this one.
Release planning
needed with deprecations, added features, breaking changes, and DB schema changes.
semver, or if it's mainly a patch change. The PR is targeted at the next
release branch if it's not a patch change.
Fixes #2365 #2467
What
Implement CAP 27 and SEP 23
This PR doesn't provide a full integration with CAP27 though:
MuxedAccount
s intoAccountId
s(by dropping the memo ID). This means that queries will only show AccountId G-strkeys.
POST transaction
endpoint will accept transactions using CAP27sXDR, so clients need to be adapted to that.
Why
Because the Stellar protocol is everchanging.
Known limitations
Query responses won't contain MuxedAccounts (M-prefixed strkeys) where expected, instead horizon will internally (during ingestion) transform MuxedAccounts into AccountIds (G-prefixed strkey) by dropping the the memo id. This may come as a surprise to end-users.