Skip to content

Commit

Permalink
Separate production from dry runs in executor & Cleanup all execution…
Browse files Browse the repository at this point in the history
… paths :) (#1873)

Closes: #1751

- Separate `Production` from `DryRun` and remove `ExecutionKind` and
`ExecutionType`.
- Refactor code down
- Remove `thread_block_transaction` concept because YAGNI
- Remove `PartialBlockComponent` type
- Remove intermediate `inner` functions
- Separate `block_storage_tx` from `BlockExecutor`. This was for a
couple of reasons, but the big one is that all the `&mut self`s of the
`BlockExecutor` can only be handed out one at a time and that was making
the code more complicated. We could have just deconstructed `self`, but
then we wouldn't have access to any methods. This was a clean way to
separate them, and it makes more sense logically IMO. `ExecutorInstance`
still keeps them together, so maybe there is an argument so separate
them higher, but this is a good improvement in the mean time.

## Checklist
- [ ] Breaking changes are clearly marked as such in the PR description
and changelog
- [ ] New behavior is reflected in tests
- [ ] [The specification](https://github.com/FuelLabs/fuel-specs/)
matches the implemented behavior (link update PR if changes are needed)

### Before requesting review
- [x] I have reviewed the code myself
- [ ] I have created follow-up issues caused by this PR and linked them
here

### After merging, notify other teams

[Add or remove entries as needed]

- [ ] [Rust SDK](https://github.com/FuelLabs/fuels-rs/)
- [ ] [Sway compiler](https://github.com/FuelLabs/sway/)
- [ ] [Platform
documentation](https://github.com/FuelLabs/devrel-requests/issues/new?assignees=&labels=new+request&projects=&template=NEW-REQUEST.yml&title=%5BRequest%5D%3A+)
(for out-of-organization contributors, the person merging the PR will do
this)
- [ ] Someone else?

---------

Co-authored-by: xgreenx <xgreenx9999@gmail.com>
  • Loading branch information
MitchTurner and xgreenx committed May 7, 2024
1 parent 059f02d commit 9cc93b1
Show file tree
Hide file tree
Showing 13 changed files with 564 additions and 859 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- [#1879](https://github.com/FuelLabs/fuel-core/pull/1879): Return the old behaviour for the `discovery_works` test.
- [#1848](https://github.com/FuelLabs/fuel-core/pull/1848): Added `version` field to the `Block` and `BlockHeader` GraphQL entities. Added corresponding `version` field to the `Block` and `BlockHeader` client types in `fuel-core-client`.

### Changed

- [#1873](https://github.com/FuelLabs/fuel-core/pull/1873/): Separate dry runs from block production in executor code, remove `ExecutionKind` and `ExecutionType`, remove `thread_block_transaction` concept, remove `PartialBlockComponent` type, refactor away `inner` functions.

## [Version 0.26.0]

### Fixed
Expand Down
Loading

0 comments on commit 9cc93b1

Please sign in to comment.