FilOzone / FilOzone/foc-devnet

replace `TRANSACTION_CONFIRMATION_WAIT_SECS` with receipt confirmations

Open
#59 1 comment 0 reactions 0 assignees View on GitHub
good first issue
Dominant language
Rust
Stars
4
Forks
5
Avg merge
8h 17m
Merged PRs (30d)
15

Description

ok I see you do a similar thing elsewhere (`TRANSACTION_CONFIRMATION_WAIT_SECS`). You can fix all of those in a separate PR. That should improve the setup time by a few minutes.

_Originally posted by @wjmelements in https://github.com/FilOzone/foc-devnet/pull/57#discussion_r2770365134_

We want to avoid sleeping between transactions to reduce the time it takes to run everything.

`cast send` waits for confirmation by default. Might need `--confirmations 2` if the state isn't updated after 1 confirmation.

Instead of waiting between transactions, increment nonce and pass it to `cast --async` when possible. Only wait for the last transaction in a sequence. For deploying transactions, you can calculate the contract address ahead of time via sender+nonce, so it is not necessary to await a transaction just to obtain an address.

Separately, the devnet block time should be configurable. Please ensure it has been set to some low value.

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate every use of TRANSACTION_CONFIRMATION_WAIT_SECS and the transaction setup paths that invoke cast send. Compare those waits with cast's receipt confirmation and async options; done means transaction sequences avoid unnecessary sleeps, only the final transaction is awaited where appropriate, and the devnet block time is configurable at a low value.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
blockchain
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.