-
Notifications
You must be signed in to change notification settings - Fork 969
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
CAP-0015 Implementation #2419
CAP-0015 Implementation #2419
Conversation
9861248
to
79fa78d
Compare
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.
partial review only - I didn't review " Update TransactionQueue for fee-bump transactions " and beyond
src/herder/TransactionQueue.cpp
Outdated
{ | ||
int64_t oldFee = (*oldTxIter)->getFeeBid(); | ||
if (fee < FEE_MULTIPLIER * oldFee) | ||
{ |
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.
tx->getResult().result.code(txINSUFFICIENT_FEE);
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.
Done.
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.
What was decided on the tx
endpoint: when we return txINSUFFICIENT_FEE
, should we return some other information like fee required? (can be in XDR if this is only for Bump Fee or on the side)
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 don't think we ever came to a final conclusion on this. I'd rather not do the change in XDR. I think adding a field to the JSON response like "recommended_fee" would probably be best. This assumes that we want a "submit-then-get-recommendation" model, but other models like "get-recommendation-before-submit" are also possible. We should follow up with the Horizon team to see if they have any input on how this interface should work (@ire-and-curses).
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've addressed most of your comments and added many new tests. The remaining comments involve de-duplicating some code and re-ordering some commits, both of which I will do once we are otherwise satisfied with the PR.
List of warnings I am getting off 02a1fd614ed6a944a3df1734ae50458d2d11cb79
|
Patch for VS project
|
src/herder/TransactionQueue.cpp
Outdated
{ | ||
int64_t oldFee = (*oldTxIter)->getFeeBid(); | ||
if (fee < FEE_MULTIPLIER * oldFee) | ||
{ |
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.
What was decided on the tx
endpoint: when we return txINSUFFICIENT_FEE
, should we return some other information like fee required? (can be in XDR if this is only for Bump Fee or on the side)
02a1fd6
to
36c59b5
Compare
Latest warnings:
|
Left a few comments, mostly cosmetic @jonjove |
// because it is be used to represent the result of a Transaction. | ||
struct InnerTransactionResult | ||
{ | ||
int64 feeCharged; |
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.
is there ever a case where feeCharged
will not be zero? It seems that the test cases in src/transactions/test/FeeBumpTransactionTests.cpp assert that the feeCharged
in the inner transaction result is zero. If that's the case then it would be helpful to add a comment indicating that feeCharged
should be ignored and it's only there so that InnerTransactionResult
is binary compatible with TransactionResult
.
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.
Done.
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.
one question related to backward compatibility in the transaction queue
ca02835
to
8780721
Compare
r+ 8780721 |
Implements https://github.com/stellar/stellar-protocol/blob/master/core/cap-0015.md
Checklist
clang-format
v5.0.0 (viamake format
or the Visual Studio extension)