-
Notifications
You must be signed in to change notification settings - Fork 85
Xls 68 sponsored fees reserves updated #720
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
Merged
Merged
Changes from 54 commits
Commits
Show all changes
109 commits
Select commit
Hold shift + click to select a range
10f0f48
initial commit
Patel-Raj11 0778c7e
add tests for IssueType
Patel-Raj11 b352310
add NumberType tests
Patel-Raj11 b356de7
add tests
Patel-Raj11 e5c7d5d
add DomainID to permission domain
Patel-Raj11 38de730
add fixtures
Patel-Raj11 1735fbe
rename NumberAmount to AssetAmount
Patel-Raj11 74866b0
add IssueType tests
Patel-Raj11 e04b31d
import IT
Patel-Raj11 756f6b3
add more tests
Patel-Raj11 b9a4984
Merge branch 'main' of github.com:XRPLF/xrpl4j into rp/single-asset-v…
Patel-Raj11 623ac44
fix checkstyle warnings
Patel-Raj11 0a13d73
add transactions, ledger objects and tests
Patel-Raj11 318e66c
Merge branch 'main' of github.com:XRPLF/xrpl4j into rp/single-asset-v…
Patel-Raj11 5256ce8
address code review comments
Patel-Raj11 95a0530
add migration guide
Patel-Raj11 4d6b600
remove unnecessary checks
Patel-Raj11 41d2a8e
merge main
Patel-Raj11 e7a4a7c
small refactor
Patel-Raj11 31ba40e
update migration guide
Patel-Raj11 e2f2730
xrpl-ai suggestions
Patel-Raj11 82bdeef
Merge branch 'rp/single-asset-vault' of github.com:XRPLF/xrpl4j into …
Patel-Raj11 2793212
add helper methods for counterparty signing
Patel-Raj11 9f42146
add sorting support for multi-sign in CounterpartySignature
Patel-Raj11 f534f03
add tests for signing/multi-sign
Patel-Raj11 d8f263b
add isNegative and isZero on AssetAmount
Patel-Raj11 ca0c0db
add LoanBrokerSetTest
Patel-Raj11 5d3e673
add LoanBrokerDeleteTest
Patel-Raj11 2d58cf4
add computeLoanSetNetworkFees
Patel-Raj11 a06aba6
add LoanBrokerCoverDepositTest
Patel-Raj11 b95ca09
add LoanBrokerCoverWithdrawTest
Patel-Raj11 d4b5b21
add LoanBrokerCoverClawbackTest
Patel-Raj11 de6bbce
add LoanSet test
Patel-Raj11 2548693
add more tests
Patel-Raj11 18e4e35
add Meta object tests
Patel-Raj11 5cd4613
disable SingleAssetVaultIT on Testnet
Patel-Raj11 f3dfe78
refactor IT
Patel-Raj11 37a3c4c
Merge branch 'rp/single-asset-vault' of github.com:XRPLF/xrpl4j into …
Patel-Raj11 3e0e70d
fix checkstyle warnings
Patel-Raj11 e6be22d
restore XrplEnvironment
Patel-Raj11 22de7b0
add checks on AssetAmount
Patel-Raj11 e71f59f
add signers length checks
Patel-Raj11 f45a2ca
increase coverage
Patel-Raj11 1c4520f
fix checkstyle
Patel-Raj11 836094c
initial commit XLS-0068
cybele-ripple 2b7ea27
added changes based on 2 agent reviews
cybele-ripple 6e180a9
remove superfluous files
cybele-ripple 4721b13
remove config file
cybele-ripple a34b883
fix linting errors
cybele-ripple a5f2592
fixed @beta tag
cybele-ripple 9252ebe
added wrappers for single signed and multi signed transactions
cybele-ripple 996cb5f
resolve error related to merge
cybele-ripple 30034c7
enhanced test coverage
cybele-ripple 8019191
added test coverage
cybele-ripple a4eebe3
addressed PR comments
cybele-ripple 71fa82e
added validation checks
cybele-ripple 0b4f73f
use xrpld:sponsor
cybele-ripple fa76ae0
fix combatibility issues
cybele-ripple 9de74aa
addressed PR comments
cybele-ripple aefeb82
test fix: Enable SponsorshipIT and align with rippled XLS-68 sponsor …
cybele-ripple fb7afb5
test fix: update SponsorshipFlagsTest to match lsf* flag values (0x10…
cybele-ripple 6a4f773
fix: restore legleux/xrpld:sponsor as RippledContainer image for CI
cybele-ripple 2773b22
chore(test): use local xrpld:sponsor-local image for RippledContainer
cybele-ripple 083e400
style: fix VariableDeclarationUsageDistance on charlieAddress in Spon…
cybele-ripple f182437
style: fix VariableDeclarationUsageDistance on charlieKeyPair in Spon…
cybele-ripple cc47dd4
fix(test): revert RippledContainer to legleux/xrpld:sponsor for CI
cybele-ripple 2ee9cf3
fix(codec): add missing SponseeNode field to definitions.json
cybele-ripple 36ca5ff
merge: integrate origin/main into XLS-68-sponsored-fees-reservesupdated
cybele-ripple 7494f91
fix: remove direct docker-java-api import to fix undeclared dependenc…
cybele-ripple 631dfd4
fix: declare docker-java-api dependency and disable SponsorshipIT on …
cybele-ripple 93f3560
fix: rebase Sponsor model onto current rippled#7350 wire format
cybele-ripple 819d882
fix: use fully-qualified Beta reference in Sponsor field javadoc
cybele-ripple 1193a5a
fix: revert SponsorshipSet/SponsorshipTransfer type codes to 86/85
cybele-ripple d953e97
Address PR #720 review comments: signing, validation, and CI fixes
cybele-ripple 6129ba3
Remove now-unused docker-java-api dependency
cybele-ripple a770ad7
Merge origin/main into XLS-68-sponsored-fees-reservesupdated
cybele-ripple 452d8aa
Fix stale Sponsor field wire-format numbers (nth) and naming
cybele-ripple f61c3ff
Remove stale Granular Permission TODO
cybele-ripple 2c3c9c2
Fix broken javadoc reference in SponsorSignature after package move
cybele-ripple b164283
Fix IT container startup: rename Batch amendment to BatchV1_1
cybele-ripple afa62c9
Align Sponsor definitions with rippleci/xrpld:develop
cybele-ripple ad5cae5
Correct SponsorshipTransfer flag bit values to match rippled develop
cybele-ripple 2fc1ccd
Address PR #720 review comments: OwnerNode/SponseeNode types, Sponsor…
cybele-ripple 5891a3f
Address remaining PR #720 review comments: inline SponsorshipValidati…
cybele-ripple 3f1549f
Move SponsorSignature to model.transactions, remove fabricated Accoun…
cybele-ripple 4b9e6eb
Fix SponsorshipLedgerEntryParams field name to match rippled's ledger…
cybele-ripple 4c02d51
Address PR #720 review comments: typed SponsorFlags, Sponsor on remai…
cybele-ripple fdc8710
Merge remote-tracking branch 'origin/main' into XLS-68-sponsored-fees…
cybele-ripple c990e37
Improve patch coverage for XLS-68 sponsorship code
cybele-ripple feb7906
Address PR #720 review round: spec-compliance fixes and broader Spons…
cybele-ripple 9c6c22e
Address remaining PR #720 IT/signing review comments (verified agains…
cybele-ripple 363ec8f
Merge branch 'main' into XLS-68-sponsored-fees-reservesupdated
sappenin 9b81a06
Remove Sponsor from ledger objects excluded by updated XLS-0068 v1 scope
cybele-ripple aae9ed8
Merge remote-tracking branch 'origin/XLS-68-sponsored-fees-reservesup…
cybele-ripple d8fe103
fix: rename SponsorshipSet FeeAmount to FeeAmountDelta per rippled PR…
cybele-ripple 18e838f
Merge branch 'main' into XLS-68-sponsored-fees-reservesupdated
sappenin 7acf7bf
Fix FeeAmount JsonProperty mismatch in SponsorshipSet
cybele-ripple 2eef159
Align sponsorship validation with rippled PR #7350
cybele-ripple 3801a39
Align SponsorshipSet with rippled PR #335 (FeeAmountDelta/RemainingOw…
cybele-ripple 1234ab1
ci: bump XRPLD_PRIVATE_VERSION to 3.3.0-rc7
cybele-ripple 4765614
codec: add Int32 serialized type support
cybele-ripple 5d8dcdc
Merge remote-tracking branch 'origin/main' into XLS-68-sponsored-fees…
cybele-ripple 40c6e79
fix: allow building an account-level SponsorshipTransfer without a Sp…
cybele-ripple 0be96c5
fix: catch NumberFormatException in Int32Type#toJson()
cybele-ripple 4359407
Merge remote-tracking branch 'origin/main' into XLS-68-sponsored-fees…
cybele-ripple 9dde910
docs: Sponsor amendment is now supported on public rippled develop, n…
cybele-ripple 457bbe3
Add MetaSponsorshipObject and dedupe FeeAmount/MaxFee in definitions.…
cybele-ripple 12d2450
Merge remote-tracking branch 'origin/main' into XLS-68-sponsored-fees…
cybele-ripple abfb1bd
Merge branch 'main' into XLS-68-sponsored-fees-reservesupdated
cybele-ripple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,191 @@ | ||
| # Version 6 to Version 7 Migration Guide | ||
|
|
||
| This guide outlines the breaking changes between v6.x.x and v7.0.0 and provides an upgrade path for applications using | ||
| xrpl4j. | ||
|
|
||
| ## Overview | ||
|
|
||
| Version 7.0.0 introduces several breaking changes: | ||
|
|
||
| 1. **Issue Model Refactor** — `Issue` has been refactored from a concrete immutable into a polymorphic interface with | ||
| three subtypes (`XrpIssue`, `IouIssue`, `MptIssue`) to support the | ||
| [Single Asset Vault](https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0065-single-asset-vault) amendment. | ||
| 2. **Transaction Signing API Refactor** — `SignatureUtils.addSignatureToTransaction()` and | ||
| `SignatureUtils.addMultiSignaturesToTransaction()` have been removed. Transaction signing now uses Immutables-generated | ||
| `withTransactionSignature()` and `withSigners()` methods on `Transaction`, and validation has moved to `@Check` | ||
| methods on `SingleSignedTransaction` and `MultiSignedTransaction`. | ||
|
|
||
| ## Breaking Changes | ||
|
|
||
| ### 1. Issue Model | ||
|
|
||
| #### Issue is now an interface | ||
|
|
||
| `Issue` was previously an `@Value.Immutable` with a `builder()` method, a `currency()` field, and an optional | ||
| `issuer()` field. It is now a plain interface with three concrete implementations: `XrpIssue`, `IouIssue`, and | ||
| `MptIssue`. The `Issue` interface provides `handle()` and `map()` methods for type-safe polymorphic dispatch across the | ||
| three subtypes. | ||
|
|
||
| #### Issue.builder() removed | ||
|
|
||
| `Issue.builder()` and `ImmutableIssue.Builder` no longer exist. Use the concrete subtype builders instead. | ||
|
|
||
| **Migration:** | ||
|
|
||
| ```java | ||
| // Before (v6.x.x): XRP Issue | ||
| Issue xrp = Issue.builder().currency("XRP").build(); | ||
|
|
||
| // After (v7.0.0): XRP Issue | ||
| Issue xrp = Issue.XRP; // or XrpIssue.XRP | ||
|
|
||
| // Before (v6.x.x): IOU Issue | ||
| Issue usd = Issue.builder() | ||
| .currency("USD") | ||
| .issuer(issuerAddress) | ||
| .build(); | ||
|
|
||
| // After (v7.0.0): IOU Issue | ||
| Issue usd = IouIssue.builder() | ||
| .currency("USD") | ||
| .issuer(issuerAddress) | ||
| .build(); | ||
| ``` | ||
|
|
||
| You can now also create MPT issues: | ||
|
|
||
| ```java | ||
| // New in v7.0.0: MPT Issue | ||
| Issue mpt = MptIssue.builder() | ||
| .mptIssuanceId(mptIssuanceId) | ||
| .build(); | ||
| ``` | ||
|
|
||
| #### Issue.currency() and Issue.issuer() removed | ||
|
|
||
| The `currency()` and `issuer()` accessors are no longer on the `Issue` interface. They have moved to the concrete | ||
| subtypes where they apply: | ||
|
|
||
| - `XrpIssue.currency()` — always returns `"XRP"` | ||
| - `IouIssue.currency()` — returns the currency code | ||
| - `IouIssue.issuer()` — returns the issuer `Address` | ||
| - `MptIssue.mptIssuanceId()` — returns the `MpTokenIssuanceId` | ||
|
|
||
| **Migration:** | ||
|
|
||
| Use the `handle()` or `map()` methods to work with `Issue` instances polymorphically. For example, in v6.x.x you could | ||
| access currency and issuer directly from an `AmmObject`: | ||
|
|
||
| ```java | ||
| // Before (v6.x.x) | ||
| Issue issue = ammObject.asset(); | ||
| String currency = issue.currency(); | ||
| Optional<Address> issuer = issue.issuer(); | ||
| ``` | ||
|
|
||
| In v7.0.0, objects like `VaultObject` can hold any asset type (XRP, IOU, or MPT). Use `handle()` to dispatch based on | ||
| the concrete type: | ||
|
|
||
| ```java | ||
| // After (v7.0.0) | ||
| Issue issue = vaultObject.asset(); | ||
| issue.handle( | ||
| // Handle XRP | ||
| xrpIssue -> { | ||
| String currency = xrpIssue.currency(); // "XRP" | ||
| }, | ||
| // Handle IOU | ||
| iouIssue -> { | ||
| String currency = iouIssue.currency(); | ||
| Address issuer = iouIssue.issuer(); | ||
| }, | ||
| // Handle MPT | ||
| mptIssue -> { | ||
| MpTokenIssuanceId issuanceId = mptIssue.mptIssuanceId(); | ||
| } | ||
| ); | ||
| ``` | ||
|
|
||
| Or use `map()` to transform an `Issue` into a value: | ||
|
|
||
| ```java | ||
| Issue issue = vaultObject.asset(); | ||
| String description = issue.map( | ||
| xrpIssue -> "XRP", | ||
| iouIssue -> iouIssue.currency() + "/" + iouIssue.issuer(), | ||
| mptIssue -> "MPT:" + mptIssue.mptIssuanceId() | ||
| ); | ||
| ``` | ||
|
|
||
| #### JSON Serialization | ||
|
|
||
| JSON serialization and deserialization remain compatible. The `IssueDeserializer` automatically selects the correct | ||
| subtype based on the JSON structure: | ||
|
|
||
| - `{"currency": "XRP"}` → `XrpIssue` | ||
| - `{"currency": "USD", "issuer": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn"}` → `IouIssue` | ||
| - `{"mpt_issuance_id": "00000001A407AF5856CFF3379945D823561023E8E5CED9C9"}` → `MptIssue` | ||
|
|
||
| ### 2. Transaction Signing API | ||
|
|
||
| The transaction signing internals have been refactored to eliminate per-transaction-type switch statements in | ||
| `SignatureUtils`. This change leverages Immutables-generated builder methods on the `Transaction` interface. | ||
|
|
||
| #### `SignatureUtils.addSignatureToTransaction()` removed | ||
|
|
||
| This method contained a large switch statement with explicit handling for every transaction type. It has been removed. | ||
| The signing flow now uses `Transaction.withTransactionSignature()` directly. | ||
|
|
||
| **Migration:** | ||
|
|
||
| If you were calling `addSignatureToTransaction()` directly (uncommon — this was primarily used internally by | ||
| `AbstractTransactionSigner`): | ||
|
|
||
| ```java | ||
| // Before (v6.x.x) | ||
| SingleSignedTransaction<Payment> signed = signatureUtils.addSignatureToTransaction(payment, signature); | ||
|
|
||
| // After (v7.0.0) | ||
| Transaction signedTx = payment.withTransactionSignature(signature); | ||
| SingleSignedTransaction<Payment> signed = SingleSignedTransaction.<Payment>builder() | ||
| .unsignedTransaction(payment) | ||
| .signature(signature) | ||
| .signedTransaction((Payment) signedTx) | ||
| .build(); | ||
| ``` | ||
|
|
||
| #### `SignatureUtils.addMultiSignaturesToTransaction()` removed | ||
|
|
||
| This method has also been removed. Use `Transaction.withSigners()` instead. | ||
|
|
||
| **Migration:** | ||
|
|
||
| ```java | ||
| // Before (v6.x.x) | ||
| Transaction multiSigned = signatureUtils.addMultiSignaturesToTransaction(transaction, signerWrappers); | ||
|
|
||
| // After (v7.0.0) | ||
| Transaction multiSigned = transaction.withSigners(signerWrappers); | ||
| ``` | ||
|
|
||
| #### New `Transaction` interface methods | ||
|
|
||
| Two new methods have been added to the `Transaction` interface. Immutables generates concrete implementations of these | ||
| for every transaction subclass: | ||
|
|
||
| - `Transaction withTransactionSignature(Signature signature)` — returns a copy of the transaction with the signature | ||
| applied. | ||
| - `Transaction withSigners(Iterable<? extends SignerWrapper> signers)` — returns a copy of the transaction with the | ||
| specified signers applied. | ||
|
|
||
| ## Backward Compatibility | ||
|
|
||
| - JSON serialization and deserialization remain compatible with the same JSON structure. | ||
| - The `Issue.XRP` constant is still available and works the same way. | ||
| - The `TransactionSigner.sign()` and `TransactionSigner.multiSign()` APIs are unchanged — only the internal | ||
| implementation has changed. If you use these high-level APIs (e.g., via `BcSignatureService`), no migration is needed | ||
| for signing. | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| - **XLS-0065 Specification**: https://github.com/XRPLF/XRPL-Standards/tree/master/XLS-0065-single-asset-vault |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.