Skip to content

Conversation

@yanghang8612
Copy link
Contributor

No description provided.

byte[][] signatures = extractBytesArray(
words, words[3].intValueSafe() / WORD_SIZE, rawData);
if (VMConfig.allowTvmSelfdestructRestriction()) {
int sigArraySize = words[words[3].intValueSafe() / WORD_SIZE].intValueSafe();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a general improvement?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we enhance processing efficiency by moving the judgment to the front end.

Copy link

@Sunny6889 Sunny6889 Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the PR title and description better adjust accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no difference; the goal is to optimize the proposal content.

public void extendAndWrite(int address, int allocSize, byte[] data) {
extend(address, allocSize);
write(address, data, data.length, false);
write(address, data, allocSize, false);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure whether below is better?

int writeSize = Math.min(allocSize, data.length);
write(address, data, writeSize, true); 

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your suggestion does not align with the original intent of this method's design.

@yanghang8612 yanghang8612 deleted the optimize_selfdestruct_restriction branch December 30, 2025 06:57
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

Successfully merging this pull request may close these issues.

2 participants