Skip to content

Conversation

@zees-dev
Copy link
Contributor

@zees-dev zees-dev commented Dec 7, 2023

Context

This PR introduces the XRPL transaction pallet (pallet-xrpl-transaction) - which allows for the submission of signed XRPL transactions of the SignIn type by the XUMM mobile wallet to be submitted to the chain.

The signed transaction must contain specific memo data of the extrinsic - which encodes the chain_id, nonce, max_block_number and a hash (blake256) of the scale_encoded_extrinsic to be dispatched by the mapped ethereum address (from the provided pub key in the signed transaction).

The pallet only contains a single extrinsic submit_encoded_xrpl_transaction that is a self contained call - which means that the signed transaction is validated based on the data provided in the signed transaction itself.

A signature must be provided in the submit_encoded_xrpl_transaction call (2nd param) in addition to the actual call itself (to be which is hashed and signed in the memo data); these parameters are validated against the provided encoded/signed XRPL transaction.

Original RFC

Dependent PRs

@zees-dev zees-dev marked this pull request as draft December 7, 2023 02:49
@ken-futureverse
Copy link
Contributor

can we shorten the pallet to be just xrpl @zees-dev ?

@zees-dev
Copy link
Contributor Author

zees-dev commented Dec 10, 2023

can we shorten the pallet to be just xrpl @zees-dev ?

so, pallet-xrpl?
I do think it can create confusion with xrpl-bridge and maybe xls-20 since it's not really like a top-level xrp crate.
What do you think?

Base automatically changed from feat/custom-self-contained to main December 18, 2023 21:41
@zees-dev zees-dev force-pushed the pallet-xrpl-transaction branch from 245f912 to 694c354 Compare December 19, 2023 04:33
@zees-dev zees-dev marked this pull request as ready for review December 19, 2023 04:34
@p-dealwis
Copy link

@zees-dev I'm guessing because we are using the ethereum address scheme they can't hold assets on their address in TRN? And if so does that mean they will only be able to access TRN via their FPass account?

@zees-dev
Copy link
Contributor Author

@zees-dev I'm guessing because we are using the ethereum address scheme they can't hold assets on their address in TRN? And if so does that mean they will only be able to access TRN via their FPass account?

Since the public key can be mapped to both XRP address scheme and TRN address scheme, we can use it to derive the ethereum address.
In fact this derived ethereum address is used to perform their futurepass address lookup.
Hence it is possible for both the mapped ethereum address and the respective futurepass address to hold assets.

@zees-dev zees-dev changed the title Pallet XRPL Transaction Pallet XRPL Dec 26, 2023
@zees-dev zees-dev force-pushed the pallet-xrpl-transaction branch from ad99ea0 to 5e1add0 Compare January 15, 2024 00:04
Copy link
Contributor

@surangap surangap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work👏. added couple of comments for further improvements/discussion

Copy link
Contributor

@surangap surangap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm👍

@ken-futureverse
Copy link
Contributor

I wonder if we should use genesisHash as a way to identify the chain rather the chainId in the signing payload, the problem with chainId is it relies entirely on the admin to make sure it's unique, there is nothing on-chain could validate that, meanwhile, genesisHash is a guarantee uniqueness. It also creates a weird coupling dependency between the XRPL and Frontier pallet, I assume.

Copy link
Contributor

@JasonTulp JasonTulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🚀

@zees-dev zees-dev enabled auto-merge (squash) February 19, 2024 22:41
@zees-dev zees-dev disabled auto-merge February 19, 2024 22:41
@zees-dev zees-dev merged commit ddba0c2 into main Feb 19, 2024
@zees-dev zees-dev deleted the pallet-xrpl-transaction branch February 19, 2024 22:48
@JasonTulp JasonTulp mentioned this pull request Feb 20, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants