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

chore(EXC-1840): Refactor bool to use WasmExecutionMode enum. #3586

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

alexandru-uta
Copy link
Contributor

@alexandru-uta alexandru-uta commented Jan 23, 2025

In the ExecutionState we were using a bool to represent whether a certain canister was executing in Wasm64 mode or not. In other places, such as the CyclesAccountManager we were using an enum that was cast from the bool. This PR refactors the usage of the bool parameter to using the WasmExecutionMode enum in all places. The only exception is the protobufs that are used for storing state on disk. For simplicity and compatibility we keep the bool representation there and we convert to the enum on serialization/deserialization.

@github-actions github-actions bot added the chore label Jan 23, 2025
@alexandru-uta alexandru-uta marked this pull request as ready for review January 28, 2025 10:00
@alexandru-uta alexandru-uta requested review from a team as code owners January 28, 2025 10:00
Copy link
Contributor

@adambratschikaye adambratschikaye left a comment

Choose a reason for hiding this comment

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

Looks good, just some superficial stuff.

rs/cycles_account_manager/tests/cycles_account_manager.rs Outdated Show resolved Hide resolved
rs/replicated_state/src/canister_state/execution_state.rs Outdated Show resolved Hide resolved
rs/replicated_state/src/canister_state/execution_state.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@adambratschikaye adambratschikaye left a comment

Choose a reason for hiding this comment

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

Great, thanks!

@alexandru-uta alexandru-uta added this pull request to the merge queue Jan 29, 2025
Merged via the queue into master with commit b6d1e65 Jan 29, 2025
25 checks passed
@alexandru-uta alexandru-uta deleted the alexuta/exc-1840 branch January 29, 2025 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants