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: support RPC consistency mechanism #3741

Draft
wants to merge 14 commits into
base: st/chore/[email protected]
Choose a base branch
from

Conversation

nedsalk
Copy link
Contributor

@nedsalk nedsalk commented Feb 27, 2025

Note

Merges into #3590 because that one contains the fixes to breaking changes between 0.40 and 0.41

Release notes

In this release, we:

  • added support for required_fuel_block_height to fix RPC consistency issues

Summary

flowchart TD
    Initialize[init: currentBlockHeight = 0] --> prepareRequest[prepare request]
    
    prepareRequest --> isRequestBlockSensitive[is request block height sensitive]

    isRequestBlockSensitive --> isSensitive[yes]
    isRequestBlockSensitive --> isNotSensitive[no]

    isSensitive --> addBlockHeight[inform required block height]

    addBlockHeight --> sendRequest[send request]

    isNotSensitive --> sendRequest[send request]


    sendRequest --> response[response has block height error?]

    response --> blockHeightError(yes)
    response --> noBlockHeightError(no)

    blockHeightError --> shouldRetry(should retry?)

    shouldRetry --> retry(yes)
    shouldRetry --> noRetry(no)

    retry --> wait(wait)
    wait --> sendRequest

    noRetry --> throwError(throw error)

    noBlockHeightError --> extractBlockHeight(extract block height from response)

    extractBlockHeight --> isHigher

    isHigher[is value higher than current?]

    isHigher --> higher[yes]
    isHigher --> nonHigher[no]

    higher --> updateBlockHeight[set new value]
    updateBlockHeight --> End[end]
    
    nonHigher --> End

Loading

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)

@nedsalk nedsalk added feat Issue is a feature chore Issue is a chore labels Feb 27, 2025
@nedsalk nedsalk self-assigned this Feb 27, 2025
Copy link

vercel bot commented Feb 27, 2025

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

Name Status Preview Comments Updated (UTC)
fuels-template ❌ Failed (Inspect) Feb 28, 2025 1:06pm
ts-docs ❌ Failed (Inspect) Feb 28, 2025 1:06pm
ts-docs-api ❌ Failed (Inspect) Feb 28, 2025 1:06pm

@nedsalk nedsalk removed the feat Issue is a feature label Feb 27, 2025
@github-actions github-actions bot added the feat Issue is a feature label Feb 27, 2025
@nedsalk nedsalk changed the title chore: support optimistic concurrency control chore: support RPC consistency mechanism Feb 27, 2025
@@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This got changed automatically.

@@ -224,6 +225,7 @@ export const launchNode = async ({
['--port', portToUse],
useInMemoryDb ? ['--db-type', 'in-memory'] : ['--db-path', tempDir],
['--min-gas-price', minGasPrice],
['--starting-gas-price', startingGasPrice],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some tests against the latest master of fuel-core were failing until I added this.

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.

1 participant