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

Use testnet configuration for local testnet #1894

Merged
merged 10 commits into from
May 27, 2024

Conversation

xgreenx
Copy link
Collaborator

@xgreenx xgreenx commented May 14, 2024

Closes #1530 by using coin endpoint.

  • PR increased the default gas prices to be like in testnet, making transactions much more expensive for local development. It may break tests for downstream dependencies.
  • Removed helm chart since we use operator now. Is it okay @Voxelot @rfuelsh?
  • Fixed e2e binary to work with custom base_asset_id.
  • Fixed e2e binary to work when wallet a and wallet b have many dust coins by suing coin endpoint.
  • Added json version of the non_specific_tx to simplify its support.

Checklist

  • Breaking changes are clearly marked as such in the PR description and changelog
  • New behavior is reflected in tests

@xgreenx xgreenx added the breaking A breaking api change label May 14, 2024
@xgreenx xgreenx requested a review from a team May 14, 2024 12:18
@xgreenx xgreenx self-assigned this May 14, 2024
@@ -20,7 +20,7 @@ use std::sync::Arc;

#[tokio::test]
async fn txs_max_script_gas_limit() {
const MAX_GAS_LIMIT: u64 = 50_000_000;
const MAX_GAS_LIMIT: u64 = 5_000_000_000;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Increased the max gas limit because now transactions are more expensive

@xgreenx xgreenx requested review from Voxelot and rfuelsh May 14, 2024 12:29
Copy link
Member

@MitchTurner MitchTurner left a comment

Choose a reason for hiding this comment

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

Hopefully it's okay that you're removing all the deployment stuff.

@@ -236,7 +203,7 @@ impl Wallet {
.collect(),
);
tx.max_fee_limit(BASE_AMOUNT);
tx.script_gas_limit(BASE_AMOUNT);
tx.script_gas_limit(self.consensus_params.tx_params().max_gas_per_tx() / 10);
Copy link
Member

Choose a reason for hiding this comment

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

What's the significance of 10 here? Is it just to have some arbitrary smaller limit here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, just an arbitrary value.

let dry_run_json: Transaction = serde_json::from_str(dry_run_json.as_ref())
.expect("Should be able do decode the Transaction from json representation");

// Overrides the raw tx with a json tx.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// Overrides the raw tx with a json tx.

This comment only explains the first case. The env vars are probably self-explanatory enough.

}

_dry_runs(ctx, &[dry_run], 1000, DryRunResult::MayFail).await
_dry_runs(ctx, &[dry_run_json], 1000, DryRunResult::MayFail).await
Copy link
Member

Choose a reason for hiding this comment

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

Should dry_run_json be named tx or something like that since it's already deserialized?

I'm also confused why we have the override stuff in this function if we don't even used the overridden values down here.

@@ -0,0 +1,66 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure what is meant by "non_specific". Is arbitrary_tx a better name for this (and the .raw)?

@xgreenx xgreenx merged commit 82bbfa2 into master May 27, 2024
33 checks passed
@xgreenx xgreenx deleted the feature/apply-testnet-configuration branch May 27, 2024 20:09
@xgreenx xgreenx mentioned this pull request May 29, 2024
xgreenx added a commit that referenced this pull request May 29, 2024
## Version v0.27.0

### Added
- [#1898](#1898): Enforce
increasing of the `Executor::VERSION` on each release.

### Changed

- [#1906](#1906): Makes
`cli::snapshot::Command` members public such that clients can create and
execute snapshot commands programmatically. This enables snapshot
execution in external programs, such as the regenesis test suite.
- [#1891](#1891): Regenesis
now preserves `FuelBlockMerkleData` and `FuelBlockMerkleMetadata` in the
off-chain table. These tables are checked when querying message proofs.
- [#1886](#1886): Use ref to
`Block` in validation code
- [#1876](#1876): Updated
benchmark to include the worst scenario for `CROO` opcode. Also include
consensus parameters in bench output.
- [#1879](#1879): Return the
old behaviour for the `discovery_works` test.
- [#1848](#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`.
- [#1873](#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.
- [#1900](#1900): Update the
root README as `fuel-core run` no longer has `--chain` as an option. It
has been replaced by `--snapshot`.

#### Breaking

- [#1894](#1894): Use testnet
configuration for local testnet.
- [#1894](#1894): Removed
support for helm chart.
- [#1910](#1910): `fuel-vm`
upgraded to `0.50.0`. More information in the
[changelog](https://github.com/FuelLabs/fuel-vm/releases/tag/v0.50.0).

## What's Changed
* feat: Support block and header versions gql by @bvrooman in
#1848
* Updated `croo` opcode benchmark to depend on the contract size by
@xgreenx in #1876
* Return the old behaviour for the `discovery_works` test by @xgreenx in
#1879
* Weekly `cargo update` by @github-actions in
#1880
* Separate production from dry runs in executor & Cleanup all execution
paths :) by @MitchTurner in
#1873
* Use ref instead of owned `Block` in validation by @MitchTurner in
#1886
* Weekly `cargo update` by @github-actions in
#1893
* ci: fix typos programmatically by @sdankel in
#1890
* feat: Preserve message proofs post-regenesis by @bvrooman in
#1891
* chore: update README fuel-core run options by @K1-R1 in
#1900
* Weekly `cargo update` by @github-actions in
#1903
* chore: Make snapshot command members pub accessible by @bvrooman in
#1906
* Use testnet configuration for local testnet by @xgreenx in
#1894
* Enforce increasing of the `Executor::VERSION` on each release by
@xgreenx in #1898
* Bumped the version of the `fuel-vm` to `0.50.0` by @xgreenx in
#1910

## New Contributors
* @K1-R1 made their first contribution in
#1900

**Full Changelog**:
v0.26.0...v0.27.0
kayagokalp added a commit to FuelLabs/sway that referenced this pull request Jul 8, 2024
## Description

Removes local snapshot we were using to fund our accounts as it is now
done by default as of FuelLabs/fuel-core#1894.
By default `--default-signer` is signing it with the account funded by
fuel-core out of the box.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking A breaking api change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve fuel-core-e2e-client
2 participants