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

feat: curio: add miner init #11775

Merged
merged 26 commits into from
Apr 3, 2024
Merged

feat: curio: add miner init #11775

merged 26 commits into from
Apr 3, 2024

Conversation

LexLuthr
Copy link
Contributor

@LexLuthr LexLuthr commented Mar 22, 2024

Related Issues

fixes #11758

Proposed Changes

This PR adds a miner creation option to Curio guided-setup.

Defaulting to English. Please reach out to the Curio team if you would like to have additional language support.
✔ Create a new miner
                                                                
 ┌────────────────────────────────────────────────────────────┐ 
 │This interactive tool creates a new miner actor and creates │ 
 │the basic configuration layer for it.                       │ 
 └────────────────────────────────────────────────────────────┘ 
                                                                
This process is partially idempotent. Once a new miner actor has been created and subsequent steps fail, the user need to run 'curio config new-cluster < miner ID >' to finish the configuration.
                                                                                                                                                                                                  
✔ Port: 5433
Enter the Yugabyte database port: 5435
✔ Continue to connect and update schema.
✔ Step Complete: Pre-initialization steps complete
                                                
Initializing a new miner actor.
✔ Owner Address: <empty>
Enter the owner address: t3rgs3idbhbpk2myj5cdvcxxuwznhxefo6vdcr4n6ohaa5fepsxgcwax4oqazp2ypvp5ay2qhcjbr6uykycfua
✔ Enter worker address: █3rgs3idbhbpk2myj5cdvcxxuwznhxefo6vdcr4n6ohaa5fepsxgcwax4oqazp2ypvp5ay2qhcjbr6uykycfuaEnter worker address: t3rgs3idbhbpk2myj5cdvcxxuwznhxefo6vdcr4n6ohaa5fepsxgcwax4oqazp2ypvp5ay2qhcjbr6uykycfua
✔ Sender Address: <empty>
Enter sender address: t3rgs3idbhbpk2myj5cdvcxxuwznhxefo6vdcr4n6ohaa5fepsxgcwax4oqazp2ypvp5ay2qhcjbr6uykycfua
✔ Sector Size: 0
Enter the sector size: 8mib
✔ Confidence epochs: 0
Enter the confidence: 5
Pushed CreateMiner message: bafy2bzacedlxo6syqno5op5ryyqk4s7ivkbpvcs56ro6pyq42tixtccdsclwm
Waiting for confirmation
New miners address is: t01012 (t2uchxg6gfvpbeumr46mt3rlaedgitgqhheuu2gmi)
✔ Step Complete: Miner t01012 created successfully
                                                
✔ Step Complete: New Curio configuration layer 't01012' created
                                                             
Documentation: 
The 'base' layer stores common configuration. All curio instances can include it in their --layers argument.
You can add other layers for per-machine configuration changes.
Filecoin Slack channels: #fil-curio-help and #fil-curio-dev
Start multiple Curio instances with the 'post' layer to redundancy.
One database can serve multiple miner IDs: Run a migration for each lotus-miner.
The Curio team wants to improve the software you use. Tell the team you're using `curio`.
✔ Nothing.
✔ Step Complete: New Miner initialization complete.
                                                 
Try the web interface with --layers=gui for further guided improvements.

Additional Info

Checklist

Before you mark the PR ready for review, please make sure that:

  • Commits have a clear commit message.
  • PR title is in the form of of <PR type>: <area>: <change being made>
    • example: fix: mempool: Introduce a cache for valid signatures
    • PR type: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, test
    • area, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps
  • If the PR affects users (e.g., new feature, bug fix, system requirements change), update the CHANGELOG.md and add details to the UNRELEASED section.
  • New features have usage guidelines and / or documentation updates in
  • Tests exist for new functionality or change in behavior
  • CI is green

@magik6k
Copy link
Contributor

magik6k commented Mar 24, 2024

IMO miner initialization doesn't belong in the new-cluster command.

I'd put the basic miner initialize command in sptool e.g. as sptool actor create, and then separately make it possible to initialize a miner actor in curio guided-setup interactive flow.

@LexLuthr LexLuthr changed the base branch from master to feat/sptool March 26, 2024 17:57
@snadrus
Copy link
Collaborator

snadrus commented Mar 26, 2024

Please fix my poor doc from

Start multiple Curio instances with the 'post' layer to redundancy.

to:

Increase reliability using redundancy: start multiple machines with at-least the post layer: `curio run --layers=post`

@LexLuthr
Copy link
Contributor Author

Please fix my poor doc from

Start multiple Curio instances with the 'post' layer to redundancy.

to:

Increase reliability using redundancy: start multiple machines with at-least the post layer: `curio run --layers=post`

Done

@LexLuthr LexLuthr linked an issue Mar 28, 2024 that may be closed by this pull request
cmd/curio/guidedsetup/guidedsetup.go Outdated Show resolved Hide resolved
cmd/curio/guidedsetup/guidedsetup.go Outdated Show resolved Hide resolved
cmd/curio/guidedsetup/guidedsetup.go Show resolved Hide resolved
Base automatically changed from feat/sptool to master April 1, 2024 15:30
@LexLuthr LexLuthr requested a review from snadrus April 1, 2024 19:12
@LexLuthr
Copy link
Contributor Author

LexLuthr commented Apr 1, 2024

@snadrus I have refactored guided-setup to add the new miner to base layer. I have also updated the curio config new-cluster command to do the same.

cmd/curio/guidedsetup/guidedsetup.go Outdated Show resolved Hide resolved
cmd/curio/guidedsetup/shared.go Outdated Show resolved Hide resolved
@snadrus
Copy link
Collaborator

snadrus commented Apr 2, 2024

Please ensure this workflow makes it into at-least a "Curio local net" setup document.

It could have the same lotus steps as the current one, then new miner (here) and curio picking it up. Finally sealing some sectors, ex:
./curio seal start --actor t01008 --cc --count 2 --now

@LexLuthr
Copy link
Contributor Author

LexLuthr commented Apr 2, 2024

I have added AI in docs PR for Curio devnet documentation.

@LexLuthr LexLuthr requested a review from snadrus April 2, 2024 19:58
node/config/load.go Outdated Show resolved Hide resolved
node/config/load.go Outdated Show resolved Hide resolved
@LexLuthr LexLuthr requested a review from snadrus April 3, 2024 15:26
@snadrus snadrus merged commit 9f9dc97 into master Apr 3, 2024
186 checks passed
@snadrus snadrus deleted the feat/curio-miner-init branch April 3, 2024 20:00
Nagaprasadvr pushed a commit to Nagaprasadvr/lotus that referenced this pull request Apr 4, 2024
* sptool: Initial structure

* sptool: Port lotus-miner actor withdraw

* sptool: Make cli docsgen happy

* actors are done

* info

* proving

* sptool the rest

* fixed gitignore

* lints

* oops

* 2

* terminate

* fixes

* curio new-miner setup

* reword doc section

* fix curio flags

* fix gen

* change repetitive prompt

* add miner to base

* add config test

* fix config compare, add tests

* go mod tidy

* fix itest in GA

* fix comparer function

* fix compare value match

---------

Co-authored-by: Łukasz Magiera <magik6k@gmail.com>
Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com>
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.

Add miner INIT to curio
3 participants