-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
PaychanAndEscrowForTokens
: Token-Enabled Escrows and Payment Channels support (XLS-34d+)
#4396
base: develop
Are you sure you want to change the base?
Conversation
PaychanAndEscrowForTokens
: Token-Enabled Escrows and Payment Channels support (XLS-34d)
809ca07
to
99b7700
Compare
Wondering if @ximinez and/or @scottschurr might be able to do a review of this amendment |
I'd love to, but it'll be some time before I can get to it. |
c6a49a4
to
02ee58b
Compare
For context, what is motivating this feature addition? Who will use it? |
There's a problem statement in the XLS here: XRPLF/XRPL-Standards#88 copied below for reference
|
XRPLF/XRPL-Standards#88 started amendment escrow trustline code finished, untested not compiling compiling fix invariants for IOU escrows/paychans prevent trustlines being spent below spendable balance bug fixes for IOU escrows preliminary paychan IOU support, compiling, not tested bug fixes, testing move all trustline lock and unlock logic to view, untested more refactoring compiling debugging, bug fixes templates major refactor templates for trustTransfer and lock fix logging to use journals escrow bug fixes, escrow create/finish/cancel working update claim serialization format add sfLockCount and isAddable add error message, address isAddable xrp edgecases bug fixes add lockedbalance and lockcount to account_lines rpc update error handling & fix xrp issue fix: format error change check from xrp to native + error handle add IC to tecUNFUNDED add ic signClaim fix amount bug comment unused variable tests escrow tests change error type add paychan tests enable test w/ features fix account_channels resp cont. paychan tests escrow tests cont. + lint/clean update rpc auth + verify enable disallowXRP test (escrow) paychan tests tests; rpc, disallow & abusetl fix disalllow XRP bug lint fix disallow XRP tests fix consequences test fixup consequences test update rpc call `value/currency/issuer` fix paychan marker cleanup and fix rpc call test add gateway feature clang-format fix no-line bug add pre test fix test name remove invariant test clang-format nit clang-format clang-format add transfer rate todo: fix this failing test nit nit nit update insuficient funds error clang-format clang-format precision paychan test bad currency guard fix finalAmount + guard dest Issuer fix final dest amount finish tests clang-format
I started an idea / pre-standard proposal over at XRPLF/XRPL-Standards#133 I know that what we have in this PR is a fully functional implementation, but I have serious qualms about it (outlined at the above link), that I would like to discuss before this PR moves forward. This is not a veto. This solution might be the right way to go, but I'm not convinced of that. |
Just a PSA: We're not actively promoting or defending XLS34 for merge into mainnet. We think it's the correct approach and it's what we're using on Xahau. If Ripple engineers want to (or don't want to) merge it into mainnet that's completely up to them. |
Great work on XLS-34d! This functionality is essential for most XRPL tokens, in my view. Appreciating the complexities involved, I just wanted to express my support and eagerness to see this feature go live. Your efforts in pushing this forward are invaluable. Thanks for all the hard work! |
PaychanAndEscrowForTokens
: Token-Enabled Escrows and Payment Channels support (XLS-34d)PaychanAndEscrowForTokens
: Token-Enabled Escrows and Payment Channels support (XLS-34d+)
This PR has been updated to reflect the concerns address by @ximinez
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #4396 +/- ##
=========================================
+ Coverage 71.3% 71.4% +0.1%
=========================================
Files 796 796
Lines 67031 67582 +551
Branches 10885 10899 +14
=========================================
+ Hits 47808 48281 +473
- Misses 19223 19301 +78
|
I appreciate the work you've been doing here. Unfortunately, I haven't had a chance to review the code changes themselves, and probably won't for a while. I dug up the message I sent you a while back where I outlined my ideas for the steps needed to implement token support:
From your description here, it looks like you've implemented items 3, 4, and maybe 5. That leaves items 1 and 2. Where are you on those? Also, what do you think about splitting these changes into two PRs: One for Escrows and one for Payment Channels to possibly make code review easier? |
You're right I did skip 1 & 2 but that shouldn't be too hard to implement. Will add that now. I can split them into 2 PR's no problem. I will go ahead and do that now as well. Thanks for taking a look. |
High Level Overview of Change
The proposed amendment to the XRPL protocol, XLS-34d: Token-Enabled Escrows and Payment Channels, would introduce changes to the ledger objects, transactions, and rpc methods to enable Escrows and PayChannels to use Trustline balances.
Context of Change
The proposed changes would include modifications to the following ledger objects;
RippleState
PayChannel
Escrow
The proposed changes would include modifications to the following transactions;
PaymentChannelCreate
PaymentChannelFund
PaymentChannelClaim
EscrowCreate
The proposed changes would include modifications to the following RPC methods;
account_lines
account_channels
account_objects
channel_authorize
channel_verify
Type of Change
Test Plan
PaychanAndEscrowForTokens unit tests are added for all core functionality features.
Future Tasks