Skip to content

Commit

Permalink
chore: update fuel-core to 0.38.0 (#3272)
Browse files Browse the repository at this point in the history
* wip

* add new flag

* revert debug change

* revert

* failing test

* update ids

* add changeset

* chore: fix test error messages

* chore: remove whitespace

* chore: fix test

* chore: added expect for error code

* chore: remove `--tx-ttl-check-interval` from launchNode

---------

Co-authored-by: nedsalk <[email protected]>
Co-authored-by: Peter Smith <[email protected]>
  • Loading branch information
3 people committed Nov 19, 2024
1 parent 0895905 commit 1fcc2cc
Show file tree
Hide file tree
Showing 11 changed files with 67 additions and 19 deletions.
8 changes: 8 additions & 0 deletions .changeset/strange-glasses-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@internal/fuel-core": patch
"@fuel-ts/versions": patch
"@fuel-ts/account": patch
"fuels": patch
---

chore: update `fuel-core` to `0.38.0`
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ describe('Resubmitting Failed Transactions', () => {
}
}
// #endregion resubmitting-failed-transactions-3
}).rejects.toThrow('Transaction is not inserted. UTXO does not exist: 0x');
}).rejects.toThrowError(/Transaction input validation failed: UTXO \(id: .*\) does not exist/);

await expect(
(async () => {
Expand Down
2 changes: 1 addition & 1 deletion internal/fuel-core/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.37.1
0.38.0
2 changes: 1 addition & 1 deletion packages/account/src/providers/provider.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ describe('Provider', () => {

const version = await provider.getVersion();

expect(version).toEqual('0.37.1');
expect(version).toEqual(versions.FUEL_CORE);
});

it('can call()', async () => {
Expand Down
22 changes: 15 additions & 7 deletions packages/fuel-gauge/src/funding-transaction.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FuelError } from '@fuel-ts/errors';
import { expectToThrowFuelError } from '@fuel-ts/errors/test-utils';
import { expectToThrowFuelError, safeExec } from '@fuel-ts/errors/test-utils';
import type { Account, CoinTransactionRequestInput } from 'fuels';
import { DEFAULT_RESOURCE_CACHE_TTL, ScriptTransactionRequest, Wallet, bn, sleep } from 'fuels';
import { launchTestNode } from 'fuels/test-utils';
Expand Down Expand Up @@ -507,12 +507,20 @@ describe('Funding Transactions', () => {
await sleep(100);

// Submitting TX 2 before TX 1 finished to process.
await expectToThrowFuelError(
() => fundedWallet.transfer(receiver.address, transferAmount, provider.getBaseAssetId()),
new FuelError(
FuelError.CODES.INVALID_REQUEST,
'Transaction is not inserted. Hash is already known'
)
await expect(() =>
fundedWallet.transfer(receiver.address, transferAmount, provider.getBaseAssetId())
).rejects.toThrowError(
/Transaction input validation failed: Transaction id already exists \(id: .*\)/
);

const { error: e } = await safeExec(async () => {
await fundedWallet.transfer(receiver.address, transferAmount, provider.getBaseAssetId());
});

const error = <FuelError>e;
expect(error.code).toEqual(FuelError.CODES.INVALID_REQUEST);
expect(error.message).toMatch(
/Transaction input validation failed: Transaction id already exists \(id: .*\)/
);
}, 15_000);
});
40 changes: 36 additions & 4 deletions packages/fuel-gauge/src/transaction-response.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,14 @@ describe('TransactionResponse', () => {
it('should ensure getTransactionSummary fetches a transaction and assembles transaction summary', async () => {
using launched = await launchTestNode({
nodeOptions: {
args: ['--poa-instant', 'false', '--poa-interval-period', '1s'],
args: [
'--poa-instant',
'false',
'--poa-interval-period',
'1s',
'--tx-ttl-check-interval',
'1s',
],
},
});

Expand Down Expand Up @@ -160,7 +167,14 @@ describe('TransactionResponse', () => {
* We need at least one long test to ensure that the keep-alive messages are handled correctly.
* */
nodeOptions: {
args: ['--poa-instant', 'false', '--poa-interval-period', '17sec'],
args: [
'--poa-instant',
'false',
'--poa-interval-period',
'17sec',
'--tx-ttl-check-interval',
'1s',
],
},
});

Expand Down Expand Up @@ -202,7 +216,16 @@ describe('TransactionResponse', () => {
amountPerCoin: 500_000,
},
nodeOptions: {
args: ['--poa-instant', 'false', '--poa-interval-period', '2s', '--tx-pool-ttl', '1s'],
args: [
'--poa-instant',
'false',
'--poa-interval-period',
'2s',
'--tx-pool-ttl',
'1s',
'--tx-ttl-check-interval',
'1s',
],
loggingEnabled: false,
},
});
Expand Down Expand Up @@ -245,7 +268,16 @@ describe('TransactionResponse', () => {
async () => {
using launched = await launchTestNode({
nodeOptions: {
args: ['--poa-instant', 'false', '--poa-interval-period', '4s', '--tx-pool-ttl', '1s'],
args: [
'--poa-instant',
'false',
'--poa-interval-period',
'4s',
'--tx-pool-ttl',
'1s',
'--tx-ttl-check-interval',
'1s',
],
loggingEnabled: false,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.8
Fuels version: 0.94.9
*/

import { Contract, Interface } from "../../../../..";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.8
Fuels version: 0.94.9
*/

import { Contract, ContractFactory, decompressBytecode } from "../../../../..";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.8
Fuels version: 0.94.9
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* eslint-disable @typescript-eslint/consistent-type-imports */

/*
Fuels version: 0.94.8
Fuels version: 0.94.9
*/

export { Src14OwnedProxy } from './Src14OwnedProxy';
Expand Down
2 changes: 1 addition & 1 deletion packages/versions/src/lib/getBuiltinVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { Versions } from './types';
export function getBuiltinVersions(): Versions {
return {
FORC: '0.65.2',
FUEL_CORE: '0.37.1',
FUEL_CORE: '0.38.0',
FUELS: '0.94.9',
};
}

0 comments on commit 1fcc2cc

Please sign in to comment.