-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: remove unused state variable
bridge_prover_id
(#749)
This PR is a modified version of #726 Normally I would not make a whole separate PR, but I ended up starting this work from scratch off of `develop` because I could not understand why the gas costs in `repro` were increased so much in the old PR. I have since figured out that it was some change in `Cargo.lock` that was causing the problem, but by that point I already had all this code finished in a separate branch so I thought it would be easier to make a separate PR at that point. Key differences from #726 : 1. The `repro` tests pass without any changes to the gas values (i.e. this implementation does not create a significant gas increase). This is mostly due to leaving `Cargo.lock` untouched, but there are a few other improvements as well (see below). 2. Automatically migrate the state if the V1 state is found. This change means that after the first transaction, the fallback deserialization logic will not be executed and hence reading the state will be as efficient as it always was (as exemplified by the `repro` gas costs remaining unchanged). 3. Use `Cow` in `BorshableEngineState` so that `From<&EngineState> for BorshableEngineState` does not need to clone the owner account id. 4. Ensure removing the `bridge_prover_id` field from `NewCallArgs` is done in a backwards compatible way. This is not a performance improvement, but it is still a critical change. We must ensure that changes to the format of top-level contract functions are always backwards compatible otherwise the Borealis Engine and Borealis Refiner will not be able to parse old transactions (it will fail to deserialize the arguments).
- Loading branch information
Showing
14 changed files
with
189 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.