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

deploy contracts as plain code #266

Merged
merged 12 commits into from
May 17, 2024
Merged

Conversation

kroggen
Copy link
Member

@kroggen kroggen commented Sep 27, 2023

No description provided.

@kroggen kroggen added feature New feature or request V4 To be released on hardfork V4 labels Sep 27, 2023
@kroggen kroggen changed the base branch from develop to topic/hardfork-v4 October 6, 2023 05:20
@kroggen
Copy link
Member Author

kroggen commented May 2, 2024

@hayarobi This is one of the most important PRs

@hayarobi
Copy link
Member

hayarobi commented May 7, 2024

Does this path prevent deploying compiled code?Is it breaking backward compatibility?

@hayarobi hayarobi mentioned this pull request May 8, 2024
@shepelt
Copy link

shepelt commented May 8, 2024

I think @hayarobi made a valid question regarding already deployed compiled code. It should be implemented to prevent new code deploys in bytecode format but allow existing code to run to ensure backward compatibility.

codePayload := luacUtil.LuaCodePayload(payload)
if _, err := codePayload.IsValidFormat(); err != nil {
ctrLgr.Warn().Err(err).Str("contract", types.EncodeAddress(contractAddress)).Msg("deploy")
return nil, nil, err
}
code := codePayload.Code()

// if hardfork version 4
if ctx.blockInfo.ForkVersion >= 4 {
Copy link

Choose a reason for hiding this comment

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

I think this part would insure that code running in blocks with forkversion < 4 to run as previously @hayarobi

Copy link
Member Author

Choose a reason for hiding this comment

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

The contract execution code was not modified. It remains exactly the same

@kroggen
Copy link
Member Author

kroggen commented May 16, 2024

@hayarobi please finish review

Copy link
Member

@hayarobi hayarobi left a comment

Choose a reason for hiding this comment

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

lgtm

@kroggen kroggen merged commit efb9c50 into topic/hardfork-v4 May 17, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request V4 To be released on hardfork V4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants