Open ckeshava opened 1 month ago
@mvadari thanks for the early feedback
The pull request introduces significant enhancements to the XRPL framework, focusing on credential management. It includes updates to configuration files, new transaction types, and expanded test coverage for various credential-related transactions. Key changes involve the addition of features in the configuration, new models for credential transactions (create, accept, delete), and comprehensive unit and integration tests to validate these functionalities. The updates ensure that the system can handle credential transactions effectively while maintaining backward compatibility.
File Path | Change Summary |
---|---|
.ci-config/rippled.cfg |
Added new features: fixAMMv1_1 , Credentials , NFTokenMintOffer , fixNFTokenPageLinks , fixInnerObjTemplate2 , fixEnforceNFTokenTrustline , fixReducedOffersV2 . |
tests/integration/transactions/test_credential.py |
Introduced tests for credential transactions, including creation, acceptance, and deletion, along with a utility function to check credential presence. |
tests/integration/transactions/test_deposit_preauth.py |
Enhanced tests for DepositPreauth , including renaming methods and adding new tests for authorization and credential handling. |
tests/unit/models/requests/test_deposit_authorized.py |
Added a new test class TestDepositAuthorized to validate the DepositAuthorized request. |
tests/unit/models/transactions/test_account_delete.py |
Introduced tests for the AccountDelete transaction model, validating credential ID constraints. |
tests/unit/models/transactions/test_credential_accept.py |
Added tests for the CredentialAccept transaction model, validating both valid and invalid scenarios. |
tests/unit/models/transactions/test_credential_create.py |
Created tests for the CredentialCreate class, focusing on various input validations. |
tests/unit/models/transactions/test_credential_delete.py |
Established tests for the CredentialDelete transaction model, ensuring proper error handling. |
xrpl/core/binarycodec/definitions/definitions.json |
Added new types and fields related to credentials, including transaction types for credential operations. |
xrpl/models/requests/account_objects.py |
Added new enumeration value CREDENTIAL to handle credential objects in account queries. |
xrpl/models/requests/deposit_authorized.py |
Introduced an optional field credentials to the DepositAuthorized class for credential management. |
xrpl/models/transactions/__init__.py |
Imported new credential transaction classes: CredentialAccept , CredentialCreate , CredentialDelete . |
xrpl/models/transactions/account_delete.py |
Enhanced AccountDelete class with a new credential_ids field and improved error handling. |
xrpl/models/transactions/credential_accept.py |
Defined a new model for CredentialAccept transactions with required fields and error handling. |
xrpl/models/transactions/credential_create.py |
Created a model for CredentialCreate transactions, including validation for required fields. |
xrpl/models/transactions/credential_delete.py |
Defined a model for CredentialDelete transactions with necessary validations. |
xrpl/models/transactions/deposit_preauth.py |
Enhanced DepositPreauth class with new credential fields and improved error validation logic. |
xrpl/models/transactions/escrow_finish.py |
Added credential_ids field to EscrowFinish class with validation for associated credentials. |
xrpl/models/transactions/payment.py |
Introduced credential_ids field to Payment class for managing transaction credentials. |
xrpl/models/transactions/payment_channel_claim.py |
Added credential_ids field to PaymentChannelClaim for credential management. |
xrpl/models/transactions/types/transaction_type.py |
Added new transaction types for credential operations: CREDENTIAL_ACCEPT , CREDENTIAL_CREATE , CREDENTIAL_DELETE . |
xrpl/models/utils.py |
Introduced constants and functions for credential validation, enhancing error handling. |
xrpl/models/transactions/did_set.py |
Streamlined imports and clarified error handling in the DIDSet transaction model. |
.github/workflows/integration_test.yml |
Updated Docker image version and modified commands for integration testing workflow. |
tests/unit/models/requests/test_ledger_entry.py |
Added tests for querying credential objects in ledger entries. |
xrpl/models/requests/ledger_entry.py |
Introduced new Credential class and updated LedgerEntry for credential-related queries. |
CONTRIBUTING.md |
Enhanced development setup instructions, particularly for Docker usage in integration tests. |
include_deleted
parameter to the ledger_entry API, which is relevant to the main PR's focus on enhancing the configuration for features related to credential management.include_deleted
parameter, which ties back to the main PR's modifications in the configuration file that expand functionality related to credentials.🐰 In the fields where credentials grow,
New features sprout, a vibrant show!
With tests and models, all in line,
The XRPL blooms, oh how divine!
Let's hop along, with joy and cheer,
For every change, we hold so dear! 🌼
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
@mvadari thanks for the feedback. I believe I have addressed all your comments
In the PR description under Context of Change, can you list all new transactions and requests added for this feature?
Regarding the linter failures, I'd prefer to merge this PR first: https://github.com/XRPLF/xrpl-py/pull/742
That should bring around some clarity on the black
linter expectations.
The Docker container should be available now, to run integration tests in CI.
@mDuo13 thanks for pointing out the LedgerEntry
RPC. I have included an implementation in this commit: 3814a94
@mDuo13 thank you. By Credential faucet, are you referring to tutorials/example-snippets ?
I discovered an unpleasant fact just now. The ledger_entry
RPC accepts a Credential
input and the DepositPreauth
transaction also accepts a Credential
inner object. Although both of them have identical names, they have different structures and are used for different purposes.
This does not hamper the usage of both the names, thanks to import aliasing. But if you guys feel strongly, I can re-name the ledger_entry
RPC input to a different name.
I don't have the liberty to change the DepositPreauth
transaction's input format due to binary-codec restrictions.
I discovered an unpleasant fact just now. The
ledger_entry
RPC accepts aCredential
input and theDepositPreauth
transaction also accepts aCredential
inner object. Although both of them have identical names, they have different structures and are used for different purposes.This does not hamper the usage of both the names, thanks to import aliasing. But if you guys feel strongly, I can re-name the
ledger_entry
RPC input to a different name.
Doesn't matter too much, since there are other similar issues all over the codebase (e.g. the DepositPreauth
transaction and the DepositPreauth
ledger object).
Doesn't matter too much, since there are other similar issues all over the codebase (e.g. the
DepositPreauth
transaction and theDepositPreauth
ledger object).
okay nice, that's a relief
High Level Overview of Change
Python Client SDK implementation for https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0070d-credentials
Corresponding c++ changes: https://github.com/XRPLF/rippled/pull/5103/files
Context of Change
Following changes are introduced in this PR: (Quoting Verbatim from the XLS specification document)
Type of Change
Did you update CHANGELOG.md?
Test Plan
Note: The integration tests will not pass the CI because we don't have an appropriate docker container with the custom branch. At the moment, integration tests are to be run with custom builds of rippled.