Skip to content
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

[CKB] Transaction too large for GET via URL #44

Open
WhiteR4bbitt opened this issue Dec 3, 2024 · 4 comments
Open

[CKB] Transaction too large for GET via URL #44

WhiteR4bbitt opened this issue Dec 3, 2024 · 4 comments

Comments

@WhiteR4bbitt
Copy link

When generating a CKB transaction with lots of data, it fails to load in the JoyID pop-up (and pasting the URI manually in a new window fails to load)

image

In a few test transactions I used CKBFS (which creates a lot of Witnesses to store data)

I was able to find the limit for CKBFS, but that shouldn't matter so much as the JoyID Pop-up can't handle the amount of data being passed.
This is a limitation of browsers and the character length, so any future Transactions have the potential to run into this issue.
image

This can be replicated by attempting to mint a file on the imagiNation platform when choosing the CKBFS storage type --> https://imagination.to/create

These were the 2 files I used to figure out the current limit:
sample-text-not-working.txt
sample-text-working.txt

Test 2

Thinking about future transactions I ran a test using the Spore SDK. Using the createMultipleSpores method I mocked a batch mint of 500 and get the same issue as well.

@Flouse
Copy link

Flouse commented Dec 9, 2024

link code-monad/ckbfs#1 (comment)

@WhiteR4bbitt
Copy link
Author

WhiteR4bbitt commented Dec 11, 2024

link code-monad/ckbfs#1 (comment)

This can resolve the issue with CKBFS.

Future CKB Transactions could be large without the ability to split TXs regardless.

What was previously discussed as per code-monad/ckbfs#1 (comment)? Was using POST disregarded for any reason, maybe a combo adding query params for part of the data for validity? (This could also open up the option to embed JoyID and send the TX directly instead of a prompt window)

Anyways curious on previous discussions as to not waste time blabbing about possibilities.

--
At the end of the day this is a long term issue that should be solved, the above reply is just a "band-aid" for using CKBFS with files > 254kb, so a 500 kb file is 2 TXs, which again in this scenario is fine, but also inconvenient when thinking of long term UX.

@yuche
Copy link
Collaborator

yuche commented Dec 12, 2024

@WhiteR4bbitt

We are implementing new functionality that will allow developers to convert a CKB Raw Transaction into a challenge and then call signChallnege to sign it. This allows large transaction to end up with a short hash string, but at the costs of the user not knowing what they're signing. You might consider using these new APIs.

@yuche
Copy link
Collaborator

yuche commented Dec 18, 2024

@WhiteR4bbitt

@joyid/[email protected] just released. You can sign transaction hash using following code:

const challenge = await calculateChallenge(rawTx, witnessIndexes)
const signedData = await signChallenge(challenge, address)
const signedTx = buildSignedTx(rawTx, signedData, witnessIndexes)

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

No branches or pull requests

3 participants