Skip to content

Commit

Permalink
fix(f3): try to make f3 participation stick to a single node
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Nov 1, 2024
1 parent cfde1d5 commit d60835b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
- Fix issue where F3 wouldn't start participating again if Lotus restarted without restarting the Miner ([filecoin-project/lotus#12640](https://github.com/filecoin-project/lotus/pull/12640)).
- Change the F3 HeadLookback parameter to 4 ([filecoin-project/lotus#12648](https://github.com/filecoin-project/lotus/pull/12648)).
- Upgrade go-f3 to 0.7.1 to resolve Tipset not found errors when trying to establish instance start time ([filecoin-project/lotus#12651](https://github.com/filecoin-project/lotus/pull/12651)).
- Try harder in the F3 participation loop to participate using the same lotus node ([filecoin-project/lotus#12664](https://github.com/filecoin-project/lotus/pull/12664)).

## Deps

Expand Down
6 changes: 6 additions & 0 deletions chain/lf3/participation.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/filecoin-project/go-f3/manifest"

"github.com/filecoin-project/lotus/api"
cliutil "github.com/filecoin-project/lotus/cli/util"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)

Expand Down Expand Up @@ -89,6 +90,11 @@ func (p *Participant) run(ctx context.Context) (_err error) {
}
}()

// Try to make send all requests to the same node. If a request fails, we'll switch nodes.
// This interacts with the FullNodeProxy, which is how we support multi-node setups by
// default.
ctx = cliutil.OnSingleNode(ctx)

var ticket api.F3ParticipationTicket
for ctx.Err() == nil {
var err error
Expand Down

0 comments on commit d60835b

Please sign in to comment.