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

EthereumFlow creates a truncated file for a large contract #2212

Open
OlegMazurov opened this issue Feb 3, 2025 · 3 comments
Open

EthereumFlow creates a truncated file for a large contract #2212

OlegMazurov opened this issue Feb 3, 2025 · 3 comments
Assignees
Milestone

Comments

@OlegMazurov
Copy link

When deploying a large contract using EthereumFlow() I get INVALID_FILE_ID. The file uploaded to the network is always truncated at 4096 bytes. The same contract can be successfully deployed using ContractCreateFlow (the file size is 27034 before it is deleted).

@0xivanov 0xivanov self-assigned this Feb 4, 2025
@0xivanov
Copy link
Contributor

0xivanov commented Feb 4, 2025

I haven't done contract create via ethereum transaction before. Can you share how you build the ethereumData bytes?
Also looking at the code, if the size is bigger than 4096, we do FileAppendTransaction.

@0xivanov 0xivanov added this to the v2.50.0 milestone Feb 4, 2025
@OlegMazurov
Copy link
Author

The problem is with EthereumFlow.createFile()/createFileAsync(). FileCreateTransaction does not call setKeys() and thus creates an immutable file. An attempt to call FileAppendTransaction() fails with UNAUTHORIZED but the error goes unnoticed as no receipt is requested and fileId is returned representing a truncated file.

@0xivanov
Copy link
Contributor

0xivanov commented Feb 4, 2025

I see, I will add the missing keys setter.
Today I tried creating a contract but it failed with INVALID_ACCOUNT_ID. I followed a test we have in EthereumTransactionIntegrationTest.java where we do contract execute, but I could not make it work for contract creation.
I am curious how you are building the RLP data bytes.

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

2 participants