-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
refactor(XRP): Move Ripple blockchain to Rust #4250
Merged
Merged
Conversation
This file contains 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
* Add `AccountId`, `Amount`, `Blob`, `IssuedCurrency` XRPL types * Add definitions * Add `STObject` structure helper * Add `CommonFields` and `EscrowCancel` structures
* Fix warnings
* Finish `XRPLTypes` deserialization
* Encode field and value * Encode value with variable length
…Protobuf * Add XRP Payment test
* Fix `Vector256` encoding * Take `nftoken_id` as a hex-encoded string, not a byte vector
* Add `tw_ripple` documentation * Fix C++ tests * Add WASM test
…dress * Fix Swift tests
* Fix compilation issues after merging master
Binary size comparison➡️ aarch64-apple-ios: - 13.10 MB
+ 13.50 MB +411 KB ➡️ aarch64-apple-ios-sim: - 13.10 MB
+ 13.50 MB +411 KB ➡️ aarch64-linux-android: - 17.06 MB
+ 17.72 MB +681 KB ➡️ armv7-linux-androideabi: - 14.37 MB
+ 14.89 MB +530 KB ➡️ wasm32-unknown-emscripten: - 12.12 MB
+ 12.58 MB +470 KB |
* Remove `fuzz/Cargo.lock` * Fix TODOs * Add a link to original XRP libraries
gupnik
reviewed
Feb 7, 2025
* Minimize `definitions.json` * Add `SpecialField` enum when parsing `STObject`
gupnik
approved these changes
Feb 7, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Migrate Ripple blockchain implementation to Rust.
Mainly adds
tw_ripple
crate that provides a comprehensive implementation of the Ripple/XRP blockchain in Rust.Source Code
The code of this crate is mainly inspired by xrpl-rust and xrpl-py, and tested well against unit tests from
xrpl-py
.Rust Usage
How to test
Run Rust, C++, Android, iOS, KMP, WASM tests
Breaking Changes
1.
TWRippleXAddress
module has been deprecated and deleted.2.
OperationPayment.destinationTag
,SigningInput.sequence
,SigningInput.lastLedgerSequence
are uint32 now (were int64 previously)3.
TransactionCompiler.compile()
now takes a raw secp256k1 signature (64 bytes), while it took the signature as ASN DER.1 (up to 72 bytes).Checklist
If you're adding a new blockchain