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

Finalize autobridging implementation (RIPD-179): #689

Closed
wants to merge 1 commit into from
Closed

Finalize autobridging implementation (RIPD-179): #689

wants to merge 1 commit into from

Conversation

nbougalis
Copy link
Collaborator

  • RIPD-486: Refactoring the taker into a unit-testable architecture
  • RIPD-659: Asset-aware offer crossing
  • RIPD-491: Unit tests for IOU to XRP, XRP to IOU and IOU to IOU
  • RIPD-441: Handle case when autobridging over same owner offers
  • RIPD-665: Handle case when autobridging over own offers
  • RIPD-273: Groom order books while crossing

Additionally, add support in LedgerEntrySet to allow transfer fees
to be specified by calling code instead of being calculated by the
transfer functions:

  • Implement new "issue/redeem" model for IOU movements
  • Implement new "transfer" model for IOU movements

Clean up signature verification logic in the main Transactor.

Reviews: @JoelKatz, @rec, @vinniefalco but everyone is welcome to get in on the game.

@vinniefalco
Copy link
Contributor

You're gonna need a much bigger commit message than that

class Rate
{
private:
std::uint32_t quality_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for always starting with quibbles while I read through the whole thing.

I think you could make both of these members const...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really a fan of const data members. The class becomes unassignable where previously it could have been assigned.

@nbougalis
Copy link
Collaborator Author

I have rebased the code against the latest develop (sorry, I had to - I didn't want to be too far out of date) and have addressed some of the concerns from the preliminary review from you guys and in-person reviews at the office.

return original_;
}

// TODO: the presence of 'output' is an artifact caused by the fact that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment adds mystery rather than removes it. You seem to use all of output, yes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really understand why the issue is at, cough, issue at all in this code. You're just performing a division. Is that what you're referring to? If so, get rid of the asserts - if you don't believe that issue should be there, you shouldn't complain if it's wrong! :-)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not call it multiplyAndClamp or multiplyAndLimit - you're doing two things (multiplying and taking an std::min) not just multiplying (or dividing).

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explicitly documenting the clamp would be a good idea, thanks.

@rec
Copy link
Contributor

rec commented Nov 14, 2014

Ping!! We have 19 pull requests on the queue...

* RIPD-486: Refactoring the taker into a unit-testable architecture
* RIPD-659: Asset-aware offer crossing
* RIPD-491: Unit tests for IOU to XRP, XRP to IOU and IOU to IOU
* RIPD-441: Handle case when autobridging over same owner offers
* RIPD-665: Handle case when autobridging over own offers
* RIPD-273: Groom order books while crossing

Additionally, add support in LedgerEntrySet to allow transfer fees
to be specified by calling code instead of being calculated by the
transfer functions:

* Implement new "issue/redeem" model for IOU movements
* Implement new "transfer" model for IOU movements

Clean up signature verification logic in the main Transactor.
@rec
Copy link
Contributor

rec commented Nov 17, 2014

So you seem to have rebased and squashed into one commit. It would have been helpful to have changes be a separate commit, 'cause now we have to review the whole thing again... :-(

@nbougalis
Copy link
Collaborator Author

It's just rebased - there are no functional changes; only comments and a gratuitous rename.

@vinniefalco
Copy link
Contributor

Need a much bigger commit message. Also can the LedgerEntrySet change be pulled out into its own earlier commit with a descriptive message?

@nbougalis
Copy link
Collaborator Author

Vinnie, I'll see about pulling the issue/redeem stuff out. Actually, I think that most of that might have already been pulled into develop and this just begins using the API. I'll update accordingly.

@rec
Copy link
Contributor

rec commented Nov 20, 2014

So I was pretty good with what's there, so I'm really interested in either seeing the issue/redeem stuff pulled out, or seeing this checked in.

@vinniefalco
Copy link
Contributor

@rec This changes transaction processing so its not safe to merge in active form. Although, I'm strongly in favor of merging it but with a preprocessor setting to have it turned off.

@nbougalis
Copy link
Collaborator Author

This changes transaction processing whether autobridging is enabled or not. I will pull the issue_iou and redeem_iou changes out.

@sublimator
Copy link
Contributor

Leaving this here as a reminder: https://github.com/sublimator/rippled/commits/autobridge-tests

@sublimator
Copy link
Contributor

Seems like This branch is 1 commit ahead, 15 commits behind ripple:develop and has merge conflicts when rebasing.

@nbougalis
Copy link
Collaborator Author

This branch is out of date - I don't want to rebase it and spoil the review. For a rebased version, check out https://github.com/nbougalis/rippled/tree/txchanges

@sublimator
Copy link
Contributor

Thank you :)

@rec
Copy link
Contributor

rec commented Jan 15, 2015

Where are we with this?

Rebasing works much better these days!!

@nbougalis
Copy link
Collaborator Author

I already have this and all other TxChanges rebased and ready to go.

@nbougalis
Copy link
Collaborator Author

Merged as 5530353 and 3ccbd7c

@nbougalis nbougalis closed this Jan 28, 2015
@nbougalis nbougalis deleted the autobridge branch January 28, 2015 02:36
@sublimator
Copy link
Contributor

Congrats

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

Successfully merging this pull request may close these issues.

None yet

5 participants