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

chore!: upgrade fuel-core to 0.41.0 #3590

Open
wants to merge 76 commits into
base: master
Choose a base branch
from

Conversation

Torres-ssf
Copy link
Contributor

@Torres-ssf Torres-ssf commented Jan 15, 2025

Release notes

In this release, we:

  • Upgraded fuel-core to 0.41.0

Summary

GraphQL

  • Add amount128 to the responses of the getBalance and getBalances queries.
  • Implement new assetDetails query.
  • Add new scalar SubId.
  • Add new scalar U128.
  • Update nodeInfoFragment with new NodeInfo fields (if needed).
  • Implement the daCompressedBlock query (if needed).

Transaction

  • Add support for the new transaction policy expiration.

Provider

  • Enable pagination for the getBalances method.
  • Consider amount128 in both the getBalance and getBalances methods.
  • Ensure the excludedIds parameter in getResourcesToSpend does not exceed the maximum number of inputs.
  • Adjust the getMessageProof method to conform with the updated MessageProof type, which now requires a non-optional response.
  • Implement the getAssetDetails method.

Docs

  • Document new transaction policy expiration

Breaking Changes

Because of the latest fuel-core changes, TS SDK does not throw the following error codes and messages anymore:

  1. NOT_ENOUGH_FUNDS
// before
"The account(s) sending the transaction don't have enough funds to cover the transaction."
// after
"Insufficient funds or too many small value coins. Consider combining UTXOs."
  1. MAX_COINS_REACHED
// before
"The account retrieving coins has exceeded the maximum number of coins per asset. Please consider combining your coins into a single UTXO."
// after
"Insufficient funds or too many small value coins. Consider combining UTXOs."

Both error codes were removed in favor of INSUFFICIENT_FUNDS_OR_MAX_COINS

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

@Torres-ssf Torres-ssf added the chore Issue is a chore label Jan 15, 2025
@Torres-ssf Torres-ssf self-assigned this Jan 15, 2025
Copy link

vercel bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 1:24pm
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 1:24pm
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 1:24pm

@petertonysmith94
Copy link
Contributor

Asset related functionality is partially implemented:

@Torres-ssf Torres-ssf changed the title chore: upgrade fuel-core to 0.41.0 chore!: upgrade fuel-core to 0.41.0 Jan 23, 2025
@Torres-ssf
Copy link
Contributor Author

@petertonysmith94

  • Will will phase out the feature flags, as all the node upgrade to the latest version?

Sure, at some point these features validation are going to be removed.

  • With regards to the policy expiration, did we considered the resource cache for the UXTO's with a transaction using the expiration?

Could you clarify what you mean regarding the policy expiration? I’m not fully following the scenario you’re describing, can you provide more details?

apps/docs/src/guide/errors/index.md Outdated Show resolved Hide resolved
apps/docs/src/guide/errors/index.md Outdated Show resolved Hide resolved
@petertonysmith94
Copy link
Contributor

petertonysmith94 commented Jan 23, 2025

With regards to the policy expiration, did we considered the resource cache for the UXTO's with a transaction using the expiration?

Could you clarify what you mean regarding the policy expiration? I’m not fully following the scenario you’re describing, can you provide more details?

@Torres-ssf I believe I may be over thinking this but if we sent a transaction with an expiration of say 5. This transactions UTXO's will be added to the resource cache as excluded UTXO's. If the expiration period is lapsed, they could get stuck in the resource cache?

@Torres-ssf
Copy link
Contributor Author

Torres-ssf commented Jan 23, 2025

@Torres-ssf I believe I may be over thinking this but if we sent a transaction with an expiration of say 5. This transactions UTXO's will be added to the resource cache as excluded UTXO's. If the expiration period is lapsed, they could get stuck in the resource cache?

@petertonysmith94 Resources from an expired but unprocessed transaction will remain in the cache until the transaction is completed or its TTL expires, which is an expected behavior.

Resources are removed from the cached under the following conditions:

  • The transaction has finished processing (success, or failure)
  • The transaction squeezed out from the queue
  • Their TTL has expired.

Implementing a solution to uncache resources from an expired but unprocessed transaction will be challenging due to the need to continuously track the current/next block while performing periodic checks. This approach can lead to errors and it does not seem optimal at all.

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
77.04%(+0%) 70.58%(-0.06%) 75.09%(-0.01%) 77.04%(+0%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/account/src/providers/provider.ts 68.88%
(+0.33%)
59.7%
(+1.24%)
70.7%
(+0.81%)
68.68%
(+0.4%)
🔴 packages/account/src/providers/generated/operations.ts 93.08%
(-0.95%)
100%
(+0%)
79.24%
(-2.39%)
93.6%
(-0.91%)
🔴 packages/account/src/providers/transaction-request/transaction-request.ts 87.5%
(-1.07%)
75.3%
(-2.78%)
84%
(+0%)
87.75%
(-1.06%)
🔴 packages/account/src/providers/utils/handle-gql-error-message.ts 85.71%
(-4.29%)
76.92%
(-6.41%)
80%
(+0%)
82.6%
(-3.76%)
🔴 packages/transactions/src/coders/policy.ts 97.91%
(+0.24%)
95%
(+0.89%)
100%
(+0%)
98%
(+0.23%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade fuel-core to 0.41.0 Support Policy Expiration Add pagination support for getBalances
4 participants