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

Extrinsic update #1703

Merged
merged 9 commits into from
Feb 15, 2024
Merged

Extrinsic update #1703

merged 9 commits into from
Feb 15, 2024

Conversation

ifrit98
Copy link
Contributor

@ifrit98 ifrit98 commented Feb 13, 2024

Create a generic extrinisc handler for substrate interface. This allows us to refactor a majority of subtensor calls to use this and simplify many of the implementations.

subtensor = bt.subtensor()

receipt = subtesor.send_extrinsic(
    wallet=wallet,
    module="SubtensorModule", # subtensor module
    function="set_weights", # function to call
    params={
        "dests": [1, 2, 3],
        "weights": [1, 2, 3],
        "netuid": 1,
        "version_key": 0,
    },
    period=10,  # set the amount of blocks the txn should live in the mempool before being cleared
    wait_for_inclusion=False,
)

This PR also:

  • fixes subtensor.set_weights to automatically update the nonce during retries and removes immortal txns by default

@ifrit98 ifrit98 marked this pull request as ready for review February 14, 2024 20:06
@ifrit98 ifrit98 merged commit a3be787 into staging Feb 15, 2024
12 checks passed
@ifrit98 ifrit98 mentioned this pull request Feb 16, 2024
@unconst unconst deleted the extrinsic-update branch March 27, 2024 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants