-
Notifications
You must be signed in to change notification settings - Fork 286
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
fix(connector-besu): set contract bytecode field's max length to 49154 #3636
Labels
Besu
bug
Something isn't working
ethereum
Issues related to ethereum connector and peristence plugin
good-first-issue-100-introductory
Hacktoberfest
Hacktoberfest participants are welcome to take a stab at issues marked with this label.
P1
Priority 1: Highest
Xdai
Tasks/bugs related to the Xdai network and the corresponding ledger connector plugin in Cactus
Milestone
Comments
petermetz
added
Besu
bug
Something isn't working
ethereum
Issues related to ethereum connector and peristence plugin
good-first-issue-100-introductory
Hacktoberfest
Hacktoberfest participants are welcome to take a stab at issues marked with this label.
P1
Priority 1: Highest
Xdai
Tasks/bugs related to the Xdai network and the corresponding ledger connector plugin in Cactus
labels
Nov 14, 2024
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Nov 14, 2024
Prior to this commit the Besu connector's API validated requests when deploying solidity contracts via their bytecode such that the length of the bytecode parameter cannot be longer than 24576 characters, but instead it should have an upper limit of 49154 characters because each byte is represented as two characters in hex. See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode. 2 + (24576 * 2) = 49154 meaning that hex stores each byte in 2 characters and that there is a 0x prefix (2 characters) which does not count towards the EVM 24576 bytecode limit." Fixes hyperledger-cacti#3636 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
5 tasks
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Nov 19, 2024
Prior to this commit the Besu connector's API validated requests when deploying solidity contracts via their bytecode such that the length of the bytecode parameter cannot be longer than 24576 characters, but instead it should have an upper limit of 49154 characters because each byte is represented as two characters in hex. See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode. 2 + (24576 * 2) = 49154 meaning that hex stores each byte in 2 characters and that there is a 0x prefix (2 characters) which does not count towards the EVM 24576 bytecode limit." Fixes hyperledger-cacti#3636 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Nov 26, 2024
Prior to this commit the Besu connector's API validated requests when deploying solidity contracts via their bytecode such that the length of the bytecode parameter cannot be longer than 24576 characters, but instead it should have an upper limit of 49154 characters because each byte is represented as two characters in hex. See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode. 2 + (24576 * 2) = 49154 meaning that hex stores each byte in 2 characters and that there is a 0x prefix (2 characters) which does not count towards the EVM 24576 bytecode limit." Fixes hyperledger-cacti#3636 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
to petermetz/cacti
that referenced
this issue
Nov 30, 2024
Prior to this commit the Besu connector's API validated requests when deploying solidity contracts via their bytecode such that the length of the bytecode parameter cannot be longer than 24576 characters, but instead it should have an upper limit of 49154 characters because each byte is represented as two characters in hex. See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode. 2 + (24576 * 2) = 49154 meaning that hex stores each byte in 2 characters and that there is a 0x prefix (2 characters) which does not count towards the EVM 24576 bytecode limit." Fixes hyperledger-cacti#3636 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
petermetz
added a commit
that referenced
this issue
Nov 30, 2024
Prior to this commit the Besu connector's API validated requests when deploying solidity contracts via their bytecode such that the length of the bytecode parameter cannot be longer than 24576 characters, but instead it should have an upper limit of 49154 characters because each byte is represented as two characters in hex. See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode. 2 + (24576 * 2) = 49154 meaning that hex stores each byte in 2 characters and that there is a 0x prefix (2 characters) which does not count towards the EVM 24576 bytecode limit." Fixes #3636 Signed-off-by: Peter Somogyvari <peter.somogyvari@accenture.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Besu
bug
Something isn't working
ethereum
Issues related to ethereum connector and peristence plugin
good-first-issue-100-introductory
Hacktoberfest
Hacktoberfest participants are welcome to take a stab at issues marked with this label.
P1
Priority 1: Highest
Xdai
Tasks/bugs related to the Xdai network and the corresponding ledger connector plugin in Cactus
Describe the bug
Right now the Besu connector's API validates requests when deploying solidity
contracts via their bytecode such that the length of the bytecode parameter
cannot be longer than
24576
characters, but instead it should have an uper limit of49154
characters.See https://ethereum.stackexchange.com/a/47556 regarding the maximum length of the bytecode.
2 + (24576 * 2) = 49154 meaning that hex stores each byte in 2 characters and that
there is a 0x prefix (2 characters) which does not count towards the EVM 24576 bytecode limit."
To Reproduce
Try to deploy a contract that has 20k bytes (which is represented as 40k hex characters).
The API will refuse to accept the request due to the incorrect assumption that one hex
character equals on byte worth of bytecode.
Expected behavior
The Besu connector API should accept exctly as long bytecode as the EVM itself does on the
Ethereum mainnet.
Hyperledger Cactus release version or commit (git rev-parse --short HEAD):
main
at the time of this writing:https://github.com/hyperledger-cacti/cacti/tree/4424bf935a913ef046fcbcda822f46471a7f2b56
Hyperledger Cactus Plugins/Connectors Used
Additional context
The text was updated successfully, but these errors were encountered: