XLS-70d Credentials
High Level Overview of Change
Implementation of Credentials feature. It extend usage of Deposit Authorization Now account that require pre-authorization can setup DepositPreauth object with allowed credentials. And only accounts that have been authorized by the specified issuer (and get credentials from them) will be allowed to send the payments. Please check XLS-70d for detailed description of the feature.
Context of Change
- Added new ledger object
CREDENTIALand its transactions -CredentialCreate, CredentialAccept, CredentialDelete -
DEPOSIT_PREAUTHledger object updated to be able to use credentials. Updated transactions:DepositPreauth, - Updated transactions to use credentials in their parameters:
Payment, EscrowFinish, AccountDelete, PaymentChannelClaim
API Impact
- [x] Public API:
deposit_authorizedaddedcredentialsfield. - [x] Public API:
ledger_entryaddedauthorize_credentialstodeposit_preauthfield. - [x] Public API:
ledger_entryaddedcredentialparameter.
Codecov Report
Attention: Patch coverage is 97.15142% with 19 lines in your changes missing coverage. Please review.
Project coverage is 77.8%. Comparing base (
c5c0e70) to head (cd9b5c9). Report is 2 commits behind head on develop.
Additional details and impacted files
@@ Coverage Diff @@
## develop #5103 +/- ##
=========================================
+ Coverage 77.7% 77.8% +0.2%
=========================================
Files 779 782 +3
Lines 66015 66614 +599
Branches 8156 8163 +7
=========================================
+ Hits 51261 51859 +598
- Misses 14754 14755 +1
| Files with missing lines | Coverage Δ | |
|---|---|---|
| include/xrpl/protocol/ErrorCodes.h | 100.0% <ø> (ø) |
|
| include/xrpl/protocol/Feature.h | 100.0% <ø> (ø) |
|
| include/xrpl/protocol/HashPrefix.h | 100.0% <ø> (ø) |
|
| include/xrpl/protocol/Indexes.h | 100.0% <100.0%> (ø) |
|
| include/xrpl/protocol/TER.h | 100.0% <ø> (ø) |
|
| include/xrpl/protocol/UintTypes.h | 100.0% <100.0%> (ø) |
|
| include/xrpl/protocol/detail/ledger_entries.macro | 100.0% <100.0%> (ø) |
|
| include/xrpl/protocol/detail/transactions.macro | 100.0% <100.0%> (ø) |
|
| src/libxrpl/protocol/ErrorCodes.cpp | 71.4% <ø> (ø) |
|
| src/libxrpl/protocol/Indexes.cpp | 98.0% <100.0%> (+0.1%) |
:arrow_up: |
| ... and 21 more |
One thing I did find is that traditional deposit auth will override the credentials. Meaning if the destination adds deposit auth credentials, then deposit auth's my account, I dont need the credentials. I'm sure you knew that but it might be worth notating in the documentation.
One thing I did find is that traditional deposit auth will override the credentials. Meaning if the destination adds deposit auth credentials, then deposit auth's my account, I dont need the credentials. I'm sure you knew that but it might be worth notating in the documentation.
The behavior will depend on credentialIDs parameter provided. If you provide it - rippled will look for deposit auth with credentials, if not - it will look for traditional deposit auth. But it will be 2 different ledger objects.
Rebased with the latest develop.
Changed functionality for credentials creation:
- Issuer must be present in the Ripple ledger.
- Credentials can be created by issuer only and accepted by subject.
- Shared node ownership of credentials between issuer and subject.
- Deleting issuer or subject lead to deleting credentials.
Squashed and rebased on the latest develop
https://github.com/XRPLF/rippled/pull/5042 is blocked by this PR
Rebased with latest develop
@ximinez this is ready to merge.
Commit message:
Introduce Credentials support (XLS-70d): (#5103)
Amendment:
- Credentials
New Transactions:
- CredentialCreate
- CredentialAccept
- CredentialDelete
Modified Transactions:
- DepositPreauth
- Payment
- EscrowFinish
- PaymentChannelClaim
- AccountDelete
New Object:
- Credential
Modified Object:
- DepositPreauth
API updates:
- ledger_entry
- account_objects
- ledger_data
- deposit_authorized
Read full spec: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0070d-credentials