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

fix: use fallback predicate estimation within transaction builder #1428

Merged
merged 7 commits into from
Jun 15, 2024

Conversation

hal3e
Copy link
Contributor

@hal3e hal3e commented Jun 14, 2024

I have moved the provider fallback into the Transaction trait via the DryRunner.

I had to move DryRunner and DryRun into fuels_core::types because of the wasm target.

BREAKING CHNGE:

  • Moved DryRunner and DryRun to fuels_core::types

Checklist

  • I have added necessary labels.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@hal3e hal3e added the bug Something isn't working label Jun 14, 2024
@hal3e hal3e self-assigned this Jun 14, 2024
};

Ok(
(latest_chain_executor_version > LATEST_STATE_TRANSITION_VERSION)
Copy link
Member

Choose a reason for hiding this comment

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

@xgreenx do we also need to check the consensus values version in case the gas prices change?

Copy link
Member

Choose a reason for hiding this comment

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

Do we want to hold off the merge until this is answered?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, we don't need to check consensus parameters for estimation. We may want to check remote version with local version to be sure that we use the latest consensus parameters. If local consensus parameters outdated, then we want to download them one more time.

We can do that because without new state transition function fuel-core can't support new gas costs variant -> If the state transition function is the same, but consensus parameters are different, we know how to download them since it is supported version.

Copy link
Member

Choose a reason for hiding this comment

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

We may want to check remote version with local version to be sure that we use the latest consensus parameters. If local consensus parameters outdated, then we want to download them one more time.

I believe we already do this. I need to double-check, though. cc @hal3e

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Currently we cache the consensus_parameters once when we connect to the node. I do not see any update mechanism. We will have to add this.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we're not updating it, we just check the supported version during the build.

Copy link
Member

Choose a reason for hiding this comment

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

Update: We'll implement this update mechanism soon as part of a follow-up work, so we don't block the release here.

MujkicA
MujkicA previously approved these changes Jun 15, 2024
digorithm
digorithm previously approved these changes Jun 15, 2024
@hal3e hal3e dismissed stale reviews from digorithm and MujkicA via 7b03277 June 15, 2024 01:25
@digorithm digorithm merged commit 7da40f7 into master Jun 15, 2024
44 checks passed
@digorithm digorithm deleted the hal3e/use-fallback-predicate-estimation branch June 15, 2024 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants