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

File created to hold large calldata for sendRawTransaction won't get deleted if an error is thrown #3219

Open
quiet-node opened this issue Nov 5, 2024 · 0 comments
Labels
internal For changes that affect the project's internal workings but not its outward-facing functionality.

Comments

@quiet-node
Copy link
Member

Problem

For eth_sendRawTransaction, if the calldata exceeds 5120 bytes, HFS is used to temporarily store the bytecode on the network. The intention is to delete the file created to hold the calldata regardless of whether the transaction succeeds or fails. However, the current implementation only deletes the file if no error is thrown; if an error occurs, the file deletion is skipped.

Solution

Here are a couple of potential solutions:

  • Attach the fileId to the error being thrown, allowing access to it directly from the error object.
  • Use a cache to temporarily store the fileId, allowing it to be re-accessed as needed, with the record removed from the cache after deletion.

Alternatives

No response

@quiet-node quiet-node added the internal For changes that affect the project's internal workings but not its outward-facing functionality. label Nov 5, 2024
@quiet-node quiet-node changed the title New file created to hold large calldata for sendRawTransaction won't get deleted if an error is thrown File created to hold large calldata for sendRawTransaction won't get deleted if an error is thrown Nov 5, 2024
@quiet-node quiet-node moved this from Backlog to Sprint Backlog in Smart Contract Sprint Board Nov 5, 2024
@quiet-node quiet-node moved this from Sprint Backlog to Backlog in Smart Contract Sprint Board Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal For changes that affect the project's internal workings but not its outward-facing functionality.
Projects
Status: Backlog
Development

No branches or pull requests

1 participant