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

Reused CheckedTransaction from transaction pool in the executor #1249

Merged
merged 5 commits into from
Jul 14, 2023

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented Jul 12, 2023

The change adds a MaybeCheckedTransaction type that is either CheckedTransaction or Transaction.

We need it because the validation of the block works with the Transaction type, while block production works with CheckedTransaction(TxPool has already validated transactions before during insertion).

The executor calls check_signatures and check_predicates that inside only will be executed if the flag is not set.
image
image

It should speedup block production

@xgreenx xgreenx requested a review from a team July 12, 2023 23:09
@xgreenx xgreenx self-assigned this Jul 12, 2023
}

let block_height = *header.height();
match tx {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should try to reduce some of the duplication in these match arms?

For example, we could first turn a MaybeCheckedTransaction into a CheckedTransaction, and then separately execute the normalized CheckedTransaction.

Voxelot
Voxelot previously approved these changes Jul 14, 2023
@xgreenx xgreenx requested review from Voxelot and a team July 14, 2023 15:30
@xgreenx xgreenx enabled auto-merge (squash) July 14, 2023 16:14
@xgreenx xgreenx merged commit d6654c6 into master Jul 14, 2023
14 of 15 checks passed
@xgreenx xgreenx deleted the feature/checked-transaction-executor branch July 14, 2023 18:52
@xgreenx xgreenx mentioned this pull request Jul 16, 2023
xgreenx added a commit that referenced this pull request Jul 17, 2023
## Release v0.20.0

The release brings a couple of new breaking changes from the [`fuel-vm
0.35.0`](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.35.0) with
bugfixes. Check the description of the VM release for more details.

The `fuel-core` release mostly improved the internal codebase but also
brought some breaking changes:
- Removed `Trigger::Hybrid` PoA block trigger mode. Only
`Trigger::Instante` and `Trigger::Interval` are available for block
production now. The main mode for testnets and mainnet will be
`Interval`.
- Removed support for `OpaqueReceipt` and the `Receipt` type doesn't
have the `raw_payload` field anymore.
- A `Receipt` type got two new variants: `Mint` and `Burn`. The
corresponding opcodes emit these new events.
- The `AssetId` is derived from `ContractId` and additional nonce. So
the `ContractId` and `AssetId` can't be the same anymore.

## What's Changed
* bump rocksdb to enable compiling with GCC 13 by @segfault-magnet in
#1219
* setting peer reputation params by @leviathanbeak in
#1202
* Take into account the actually used gas by the transactions and fetch
more transaction by @xgreenx in
#1223
* Use production configuration for `fuel-core` during benches by
@xgreenx in #1227
* Speedup and stabilize unit and integration tests by @xgreenx in
#1231
* test: State benchmarks by @bvrooman in
#1226
* Remove hybrid PoA block trigger mode by @Dentosal in
#1232
* test: Benchmark contract state insertions with DB vs. DB transactions
by @bvrooman in #1230
* multiplatform docker builds by @Voxelot in
#1233
* Fix typo in architecture.md by @eltociear in
#1241
* Expose gas cost in chain info by @MitchTurner in
#1244
* Reuse calculated tx id in executor by @MitchTurner in
#1248
* Fix multi-platform images by @Voxelot in
#1251
* Add logging of the long GraphQL queries for future debug by
@MitchTurner in #1250
* Reused `CheckedTransaction` from transaction pool in the executor by
@xgreenx in #1249
* Bump `fuel-vm` to `0.35.0` version by @xgreenx in
#1256

## New Contributors
* @segfault-magnet made their first contribution in
#1219
* @eltociear made their first contribution in
#1241
* @MitchTurner made their first contribution in
#1244

**Full Changelog**:
v0.19.1...v0.20.0
goldenpath1109 added a commit to goldenpath1109/fuel-core that referenced this pull request Sep 7, 2024
## Release v0.20.0

The release brings a couple of new breaking changes from the [`fuel-vm
0.35.0`](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.35.0) with
bugfixes. Check the description of the VM release for more details.

The `fuel-core` release mostly improved the internal codebase but also
brought some breaking changes:
- Removed `Trigger::Hybrid` PoA block trigger mode. Only
`Trigger::Instante` and `Trigger::Interval` are available for block
production now. The main mode for testnets and mainnet will be
`Interval`.
- Removed support for `OpaqueReceipt` and the `Receipt` type doesn't
have the `raw_payload` field anymore.
- A `Receipt` type got two new variants: `Mint` and `Burn`. The
corresponding opcodes emit these new events.
- The `AssetId` is derived from `ContractId` and additional nonce. So
the `ContractId` and `AssetId` can't be the same anymore.

## What's Changed
* bump rocksdb to enable compiling with GCC 13 by @segfault-magnet in
FuelLabs/fuel-core#1219
* setting peer reputation params by @leviathanbeak in
FuelLabs/fuel-core#1202
* Take into account the actually used gas by the transactions and fetch
more transaction by @xgreenx in
FuelLabs/fuel-core#1223
* Use production configuration for `fuel-core` during benches by
@xgreenx in FuelLabs/fuel-core#1227
* Speedup and stabilize unit and integration tests by @xgreenx in
FuelLabs/fuel-core#1231
* test: State benchmarks by @bvrooman in
FuelLabs/fuel-core#1226
* Remove hybrid PoA block trigger mode by @Dentosal in
FuelLabs/fuel-core#1232
* test: Benchmark contract state insertions with DB vs. DB transactions
by @bvrooman in FuelLabs/fuel-core#1230
* multiplatform docker builds by @Voxelot in
FuelLabs/fuel-core#1233
* Fix typo in architecture.md by @eltociear in
FuelLabs/fuel-core#1241
* Expose gas cost in chain info by @MitchTurner in
FuelLabs/fuel-core#1244
* Reuse calculated tx id in executor by @MitchTurner in
FuelLabs/fuel-core#1248
* Fix multi-platform images by @Voxelot in
FuelLabs/fuel-core#1251
* Add logging of the long GraphQL queries for future debug by
@MitchTurner in FuelLabs/fuel-core#1250
* Reused `CheckedTransaction` from transaction pool in the executor by
@xgreenx in FuelLabs/fuel-core#1249
* Bump `fuel-vm` to `0.35.0` version by @xgreenx in
FuelLabs/fuel-core#1256

## New Contributors
* @segfault-magnet made their first contribution in
FuelLabs/fuel-core#1219
* @eltociear made their first contribution in
FuelLabs/fuel-core#1241
* @MitchTurner made their first contribution in
FuelLabs/fuel-core#1244

**Full Changelog**:
FuelLabs/fuel-core@v0.19.1...v0.20.0
crypto523 added a commit to crypto523/fuel-core that referenced this pull request Oct 7, 2024
## Release v0.20.0

The release brings a couple of new breaking changes from the [`fuel-vm
0.35.0`](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.35.0) with
bugfixes. Check the description of the VM release for more details.

The `fuel-core` release mostly improved the internal codebase but also
brought some breaking changes:
- Removed `Trigger::Hybrid` PoA block trigger mode. Only
`Trigger::Instante` and `Trigger::Interval` are available for block
production now. The main mode for testnets and mainnet will be
`Interval`.
- Removed support for `OpaqueReceipt` and the `Receipt` type doesn't
have the `raw_payload` field anymore.
- A `Receipt` type got two new variants: `Mint` and `Burn`. The
corresponding opcodes emit these new events.
- The `AssetId` is derived from `ContractId` and additional nonce. So
the `ContractId` and `AssetId` can't be the same anymore.

## What's Changed
* bump rocksdb to enable compiling with GCC 13 by @segfault-magnet in
FuelLabs/fuel-core#1219
* setting peer reputation params by @leviathanbeak in
FuelLabs/fuel-core#1202
* Take into account the actually used gas by the transactions and fetch
more transaction by @xgreenx in
FuelLabs/fuel-core#1223
* Use production configuration for `fuel-core` during benches by
@xgreenx in FuelLabs/fuel-core#1227
* Speedup and stabilize unit and integration tests by @xgreenx in
FuelLabs/fuel-core#1231
* test: State benchmarks by @bvrooman in
FuelLabs/fuel-core#1226
* Remove hybrid PoA block trigger mode by @Dentosal in
FuelLabs/fuel-core#1232
* test: Benchmark contract state insertions with DB vs. DB transactions
by @bvrooman in FuelLabs/fuel-core#1230
* multiplatform docker builds by @Voxelot in
FuelLabs/fuel-core#1233
* Fix typo in architecture.md by @eltociear in
FuelLabs/fuel-core#1241
* Expose gas cost in chain info by @MitchTurner in
FuelLabs/fuel-core#1244
* Reuse calculated tx id in executor by @MitchTurner in
FuelLabs/fuel-core#1248
* Fix multi-platform images by @Voxelot in
FuelLabs/fuel-core#1251
* Add logging of the long GraphQL queries for future debug by
@MitchTurner in FuelLabs/fuel-core#1250
* Reused `CheckedTransaction` from transaction pool in the executor by
@xgreenx in FuelLabs/fuel-core#1249
* Bump `fuel-vm` to `0.35.0` version by @xgreenx in
FuelLabs/fuel-core#1256

## New Contributors
* @segfault-magnet made their first contribution in
FuelLabs/fuel-core#1219
* @eltociear made their first contribution in
FuelLabs/fuel-core#1241
* @MitchTurner made their first contribution in
FuelLabs/fuel-core#1244

**Full Changelog**:
FuelLabs/fuel-core@v0.19.1...v0.20.0
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.

2 participants