Skip to content

Do we have to refactor CALLDATALOAD, CALLDATASIZE, and CALLDATACOPY? #75

Closed Answered by IaroslavMazur
PaulRBerg asked this question in Q&A
Discussion options

You must be logged in to vote

What exactly do you mean by "refactoring", in the context of the aforementioned opcodes?

All of them work with the information about/from the calldata of the current execution context, and the only potential problem I've thought about in this regard is if a smart contract deployed to SabVM would try to work with the calldata directly - but instead of accounting for MNTs, it'd expect to find just the standard value there (e.g. when CALLDATALOAD is being called during the execution of the old-school CALL opcode).

While this will mean less backwards-compatibility for SabVM, I don't know what we could to to address this. It's not like we could have 2 different behaviors for these 3 opcodes, d…

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@IaroslavMazur
Comment options

@PaulRBerg
Comment options

PaulRBerg Apr 17, 2024
Maintainer Author

@IaroslavMazur
Comment options

@PaulRBerg
Comment options

PaulRBerg Apr 17, 2024
Maintainer Author

@PaulRBerg
Comment options

PaulRBerg Apr 19, 2024
Maintainer Author

Answer selected by PaulRBerg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants