diff --git a/.circleci/config.yml b/.circleci/config.yml index 30ebaf5d943..0dafceb09ae 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1031,7 +1031,7 @@ workflows: requires: - build suite: utest-unit-rest - target: "./blockstore/... ./build/... ./chain/... ./conformance/... ./curiosrc/... ./gateway/... ./journal/... ./lib/... ./markets/... ./paychmgr/... ./tools/..." + target: "./blockstore/... ./build/... ./chain/... ./conformance/... ./gateway/... ./journal/... ./lib/... ./markets/... ./paychmgr/... ./provider/... ./tools/..." resource_class: 2xlarge - test: name: test-unit-storage diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5eeba24f292..c6570734abb 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1,6 @@ # Reference # https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-on-github/about-code-owners +# Global owners +# Ensure maintainers team is a requested reviewer for non-draft PRs +* @jennijuju @Stebalien @snadrus @aarshkshah1992 @magik6k @zenground0 @arajasek @rjan90 @masih @rvagg diff --git a/.github/labels.yml b/.github/labels.yml new file mode 100644 index 00000000000..7102f13117a --- /dev/null +++ b/.github/labels.yml @@ -0,0 +1,248 @@ +### +### Special magic GitHub labels +### https://help.github.com/en/github/building-a-strong-community/encouraging-helpful-contributions-to-your-project-with-labels +# +- name: "good first issue" + color: 7057ff + description: "Good for newcomers" +- name: "help wanted" + color: 008672 + description: "Extra attention is needed" + +### +### Goals +# +- name: goal/incentives + color: ff004d + description: "Incentinet" + +### +### Areas +# +- name: area/ux + color: 00A4E0 + description: "Area: UX" +- name: area/chain/vm + color: 00A4E2 + description: "Area: Chain/VM" +- name: area/chain/sync + color: 00A4E4 + description: "Area: Chain/Sync" +- name: area/chain/misc + color: 00A4E6 + description: "Area: Chain/Misc" +- name: area/markets + color: 00A4E8 + description: "Area: Markets" +- name: area/sealing/fsm + color: 0bb1ed + description: "Area: Sealing/FSM" +- name: area/sealing/storage + color: 0EB4F0 + description: "Area: Sealing/Storage" +- name: area/proving + color: 0EB4F0 + description: "Area: Proving" +- name: area/mining + color: 10B6F2 + description: "Area: Mining" +- name: area/client/storage + color: 13B9F5 + description: "Area: Client/Storage" +- name: area/client/retrieval + color: 15BBF7 + description: "Area: Client/Retrieval" +- name: area/wallet + color: 15BBF7 + description: "Area: Wallet" +- name: area/payment-channel + color: ff6767 + description: "Area: Payment Channel" +- name: area/multisig + color: fff0ff + description: "Area: Multisig" +- name: area/networking + color: 273f8a + description: "Area: Networking" + +### +### Kinds +# +- name: kind/bug + color: c92712 + description: "Kind: Bug" +- name: kind/chore + color: fcf0b5 + description: "Kind: Chore" +- name: kind/feature + color: FFF3B8 + description: "Kind: Feature" +- name: kind/improvement + color: FFF5BA + description: "Kind: Improvement" +- name: kind/test + color: FFF8BD + description: "Kind: Test" +- name: kind/question + color: FFFDC2 + description: "Kind: Question" +- name: kind/enhancement + color: FFFFC5 + description: "Kind: Enhancement" +- name: kind/discussion + color: FFFFC7 + description: "Kind: Discussion" + +### +### Difficulties +# +- name: dif/trivial + color: b2b7ff + description: "Can be confidently tackled by newcomers, who are widely unfamiliar with lotus" +- name: dif/easy + color: 7886d7 + description: "An existing lotus user should be able to pick this up" +- name: dif/medium + color: 6574cd + description: "Prior development experience with lotus is likely helpful" +- name: dif/hard + color: 5661b3 + description: "Suggests that having worked on the specific component affected by this issue is important" +- name: dif/expert + color: 2f365f + description: "Requires extensive knowledge of the history, implications, ramifications of the issue" + +### +### Efforts +# +- name: effort/minutes + color: e8fffe + description: "Effort: Minutes" +- name: effort/hours + color: a0f0ed + description: "Effort: Hours" +- name: effort/day + color: 64d5ca + description: "Effort: One Day" +- name: effort/days + color: 4dc0b5 + description: "Effort: Multiple Days" +- name: effort/week + color: 38a89d + description: "Effort: One Week" +- name: effort/weeks + color: 20504f + description: "Effort: Multiple Weeks" + +### +### Impacts +# +- name: impact/regression + color: f1f5f8 + description: "Impact: Regression" +- name: impact/api-breakage + color: ECF0F3 + description: "Impact: API Breakage" +- name: impact/quality + color: E7EBEE + description: "Impact: Quality" +- name: impact/dx + color: E2E6E9 + description: "Impact: Developer Experience" +- name: impact/test-flakiness + color: DDE1E4 + description: "Impact: Test Flakiness" +- name: impact/consensus + color: b20014 + description: "Impact: Consensus" + +### +### Topics +# +- name: topic/interoperability + color: bf0f73 + description: "Topic: Interoperability" +- name: topic/specs + color: CC1C80 + description: "Topic: Specs" +- name: topic/docs + color: D9298D + description: "Topic: Documentation" +- name: topic/architecture + color: E53599 + description: "Topic: Architecture" + +### +### Priorities +### +- name: P0 + color: dd362a + description: "P0: Critical Blocker" +- name: P1 + color: ce8048 + description: "P1: Must be resolved" +- name: P2 + color: dbd81a + description: "P2: Should be resolved" +- name: P3 + color: 9fea8f + description: "P3: Might get resolved" + +### +### Hints +# +#- name: hint/good-first-issue +# color: 7057ff +# description: "Hint: Good First Issue" +#- name: hint/help-wanted +# color: 008672 +# description: "Hint: Help Wanted" +- name: hint/needs-decision + color: 33B9A5 + description: "Hint: Needs Decision" +- name: hint/needs-triage + color: 1AA08C + description: "Hint: Needs Triage" +- name: hint/needs-analysis + color: 26AC98 + description: "Hint: Needs Analysis" +- name: hint/needs-author-input + color: 33B9A5 + description: "Hint: Needs Author Input" +- name: hint/needs-team-input + color: 40C6B2 + description: "Hint: Needs Team Input" +- name: hint/needs-community-input + color: 4DD3BF + description: "Hint: Needs Community Input" +- name: hint/needs-review + color: 5AE0CC + description: "Hint: Needs Review" + +### +### Statuses +# +- name: status/done + color: edb3a6 + description: "Status: Done" +- name: status/deferred + color: E0A699 + description: "Status: Deferred" +- name: status/in-progress + color: D49A8D + description: "Status: In Progress" +- name: status/blocked + color: C78D80 + description: "Status: Blocked" +- name: status/inactive + color: BA8073 + description: "Status: Inactive" +- name: status/waiting + color: AD7366 + description: "Status: Waiting" +- name: status/rotten + color: 7A4033 + description: "Status: Rotten" +- name: status/discarded + color: 6D3326 + description: "Status: Discarded / Won't fix" diff --git a/.github/workflows/builtin-actor-tests.yml b/.github/workflows/builtin-actor-tests.yml index e0d95de5194..6cc49cc4688 100644 --- a/.github/workflows/builtin-actor-tests.yml +++ b/.github/workflows/builtin-actor-tests.yml @@ -11,8 +11,8 @@ jobs: name: Release Tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 + - uses: actions/checkout@v3 + - uses: actions/setup-go@v3 with: go-version: 1.21 - - run: go test -tags=release ./build + - run: go test -tags=release ./build \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 00000000000..0cba5457e0d --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,73 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: + - master + - 'release/*' + pull_request: + # The branches below must be a subset of the branches above + branches: + - master + - 'release/*' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version: '1.18.8' + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: go + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/label-syncer.yml b/.github/workflows/label-syncer.yml new file mode 100644 index 00000000000..a94b0edb631 --- /dev/null +++ b/.github/workflows/label-syncer.yml @@ -0,0 +1,17 @@ + +name: Label syncer +on: + push: + paths: + - '.github/labels.yml' + branches: + - master +jobs: + build: + name: Sync labels + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@1.0.0 + - uses: micnncim/action-label-syncer@v1.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index c81d72430fa..35b97e369f4 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -13,9 +13,9 @@ jobs: pull-requests: write steps: - - uses: actions/stale@v9 + - uses: actions/stale@v3 with: - repo-token: ${{ github.token }} + repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: 'Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 24 hours.' close-issue-message: 'This issue was closed because it is missing author input.' stale-pr-message: 'Thank you for submitting the PR and contributing to lotus! Lotus maintainers need more of your input before merging it, please address the suggested changes or reply to the comments or this PR will be closed in 48 hours. You are always more than welcome to reopen the PR later as well!' @@ -29,3 +29,5 @@ jobs: days-before-pr-close: 2 remove-stale-when-updated: true enable-statistics: true + + diff --git a/.github/workflows/sync-master-main.yaml b/.github/workflows/sync-master-main.yaml index 6a7e9a65002..a55454eff24 100644 --- a/.github/workflows/sync-master-main.yaml +++ b/.github/workflows/sync-master-main.yaml @@ -7,7 +7,7 @@ jobs: sync: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v2 - name: update remote branch main run: | # overrides the remote branch (origin:github) `main` diff --git a/.github/workflows/testground-on-push.yml b/.github/workflows/testground-on-push.yml new file mode 100644 index 00000000000..8e749bfaec1 --- /dev/null +++ b/.github/workflows/testground-on-push.yml @@ -0,0 +1,29 @@ +--- +name: Testground PR Checker + +on: [push] + +jobs: + testground: + runs-on: ubuntu-latest + name: ${{ matrix.composition_file }} + strategy: + matrix: + include: + - backend_addr: ci.testground.ipfs.team + backend_proto: https + plan_directory: testplans/lotus-soup + composition_file: testplans/lotus-soup/_compositions/baseline-k8s-3-1.toml + - backend_addr: ci.testground.ipfs.team + backend_proto: https + plan_directory: testplans/lotus-soup + composition_file: testplans/lotus-soup/_compositions/paych-stress-k8s.toml + steps: + - uses: actions/checkout@v2 + - name: testground run + uses: testground/testground-github-action@v1 + with: + backend_addr: ${{ matrix.backend_addr }} + backend_proto: ${{ matrix.backend_proto }} + plan_directory: ${{ matrix.plan_directory }} + composition_file: ${{ matrix.composition_file }} diff --git a/.gitignore b/.gitignore index ea354ba7388..c40a76fd07c 100644 --- a/.gitignore +++ b/.gitignore @@ -6,7 +6,7 @@ /lotus-chainwatch /lotus-shed /lotus-sim -/curio +/lotus-provider /lotus-townhall /lotus-fountain /lotus-stats @@ -36,9 +36,6 @@ build/paramfetch.sh /darwin /linux *.snap -curio -devgen.car -localnet.json *-fuzz.zip /chain/types/work_msg/ diff --git a/CHANGELOG.md b/CHANGELOG.md index 89aad3563c6..eca451ecdbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,6 @@ # UNRELEASED ## New features -- feat: CLI: add claim-extend cli (#11711) ([filecoin-project/lotus#11711](https://github.com/filecoin-project/lotus/pull/11711)) ## Improvements @@ -133,22 +132,20 @@ Additionally, Filecoin is not Ethereum no matter how much we try to provide API/ [handlefilecoinmethod]: https://fips.filecoin.io/FIPS/fip-0054.html#handlefilecoinmethod-general-handler-for-method-numbers--1024 -### GetActorEventsRaw and SubscribeActorEventsRaw +### GetActorEvents and SubscribeActorEvents [FIP-0049](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0049.md) introduced _Actor Events_ that can be emitted by user programmed actors. [FIP-0083](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0083.md) introduces new events emitted by the builtin Verified Registry, Miner and Market Actors. These new events for builtin actors are being activated with network version 22 to coincide with _Direct Data Onboarding_ as defined in [FIP-0076](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0076.md) which introduces additional flexibility for data onboarding. Sector, Deal and DataCap lifecycles can be tracked with these events, providing visibility and options for programmatic responses to changes in state. -Actor events are available on message receipts, but can now be retrieved from a node using the new `GetActorEventsRaw` and `SubscribeActorEventsRaw` methods. These methods allow for querying and subscribing to actor events, respectively. They depend on the Lotus node both collecting events (with `Fevm.Events.RealTimeFilterAPI` and `Fevm.Events.HistoricFilterAPI`) and being enabled with the new configuration option `Events.EnableActorEventsAPI`. Note that a Lotus node can only respond to requests for historic events that it retains in its event store. +Actor events are available on message receipts, but can now be retrieved from a node using the new `GetActorEvents` and `SubscribeActorEvents` methods. These methods allow for querying and subscribing to actor events, respectively. They depend on the Lotus node both collecting events (with `Fevm.Events.RealTimeFilterAPI` and `Fevm.Events.HistoricFilterAPI`) and being enabled with the new configuration option `Events.EnableActorEventsAPI`. Note that a Lotus node can only respond to requests for historic events that it retains in its event store. -Both `GetActorEventsRaw` and `SubscribeActorEventsRaw` take a filter parameter which can optionally filter events on: +Both `GetActorEvents` and `SubscribeActorEvents` take a filter parameter which can optionally filter events on: * `Addresses` of the actor(s) emitting the event * Specific `Fields` within the event * `FromHeight` and `ToHeight` to filter events by block height * `TipSetKey` to restrict events contained within a specific tipset -`GetActorEventsRaw` provides a one-time query for actor events, while `SubscribeActorEventsRaw` provides a long-lived connection (via websockets) to the Lotus node, allowing for real-time updates on actor events. The subscription can be cancelled by the client at any time. - -A future Lotus release may include `GetActorEvents` and `SubscribeActorEvents` methods which will provide a more user-friendly interface to actor events, including deserialization of event data. +`GetActorEvents` provides a one-time query for actor events, while `SubscribeActorEvents` provides a long-lived connection (via websockets) to the Lotus node, allowing for real-time updates on actor events. The subscription can be cancelled by the client at any time. ### GetAllClaims and GetAllAlocations Additionally the methods `GetAllAllocations` and `GetAllClaims` has been added to the Lotus API. These methods lists all the available allocations and claims available in the actor state. @@ -3694,7 +3691,7 @@ This is a **highly recommended** but optional Lotus v1.11.1 release that introd - Config for deal publishing control addresses ([filecoin-project/lotus#6697](https://github.com/filecoin-project/lotus/pull/6697)) - Set `DealPublishControl` to set the wallet used for sending `PublishStorageDeals` messages, instructions [here](https://lotus.filecoin.io/storage-providers/operate/addresses/#control-addresses). - Config UX improvements ([filecoin-project/lotus#6848](https://github.com/filecoin-project/lotus/pull/6848)) - - You can now preview the default and updated node config by running `lotus/lotus-miner config default/updated` + - You can now preview the the default and updated node config by running `lotus/lotus-miner config default/updated` ## New Features - ⭐ī¸â­ī¸â­ī¸ Support standalone miner-market process ([filecoin-project/lotus#6356](https://github.com/filecoin-project/lotus/pull/6356)) @@ -5141,7 +5138,7 @@ This consensus-breaking release of Lotus upgrades the actors version to v2.0.0. #### Mining -- Increased ExpectedSealDuration and WaitDealsDelay (https://github.com/filecoin-project/lotus/pull/3743) +- Increased ExpectedSealDuration and and WaitDealsDelay (https://github.com/filecoin-project/lotus/pull/3743) - Miner backup/restore commands (https://github.com/filecoin-project/lotus/pull/4133) - lotus-miner: add more help text to storage / attach (https://github.com/filecoin-project/lotus/pull/3961) - Reject deals that are > 7 days in the future in the BasicDealFilter (https://github.com/filecoin-project/lotus/pull/4173) diff --git a/Dockerfile b/Dockerfile index 5b77b134afb..14469533b1d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,7 +109,7 @@ COPY --from=lotus-builder /opt/filecoin/lotus-wallet /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-gateway /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-miner /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-worker /usr/local/bin/ -COPY --from=lotus-builder /opt/filecoin/curio /usr/local/bin/ +COPY --from=lotus-builder /opt/filecoin/lotus-provider /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-stats /usr/local/bin/ COPY --from=lotus-builder /opt/filecoin/lotus-fountain /usr/local/bin/ @@ -118,13 +118,13 @@ RUN mkdir /var/lib/lotus RUN mkdir /var/lib/lotus-miner RUN mkdir /var/lib/lotus-worker RUN mkdir /var/lib/lotus-wallet -RUN mkdir /var/lib/curio +RUN mkdir /var/lib/lotus-provider RUN chown fc: /var/tmp/filecoin-proof-parameters RUN chown fc: /var/lib/lotus RUN chown fc: /var/lib/lotus-miner RUN chown fc: /var/lib/lotus-worker RUN chown fc: /var/lib/lotus-wallet -RUN chown fc: /var/lib/curio +RUN chown fc: /var/lib/lotus-provider VOLUME /var/tmp/filecoin-proof-parameters @@ -132,7 +132,7 @@ VOLUME /var/lib/lotus VOLUME /var/lib/lotus-miner VOLUME /var/lib/lotus-worker VOLUME /var/lib/lotus-wallet -VOLUME /var/lib/curio +VOLUME /var/lib/lotus-provider EXPOSE 1234 EXPOSE 2345 diff --git a/Makefile b/Makefile index 6a1c9cc8a8e..b6e523b1291 100644 --- a/Makefile +++ b/Makefile @@ -66,7 +66,7 @@ CLEAN+=build/.update-modules deps: $(BUILD_DEPS) .PHONY: deps -build-devnets: build lotus-seed lotus-shed curio +build-devnets: build lotus-seed lotus-shed lotus-provider .PHONY: build-devnets debug: GOFLAGS+=-tags=debug @@ -97,14 +97,14 @@ lotus-miner: $(BUILD_DEPS) .PHONY: lotus-miner BINS+=lotus-miner -curio: $(BUILD_DEPS) - rm -f curio - $(GOCC) build $(GOFLAGS) -o curio ./cmd/curio -.PHONY: curio -BINS+=curio +lotus-provider: $(BUILD_DEPS) + rm -f lotus-provider + $(GOCC) build $(GOFLAGS) -o lotus-provider ./cmd/lotus-provider +.PHONY: lotus-provider +BINS+=lotus-provider -cu2k: GOFLAGS+=-tags=2k -cu2k: curio +lp2k: GOFLAGS+=-tags=2k +lp2k: lotus-provider lotus-worker: $(BUILD_DEPS) rm -f lotus-worker @@ -124,13 +124,13 @@ lotus-gateway: $(BUILD_DEPS) .PHONY: lotus-gateway BINS+=lotus-gateway -build: lotus lotus-miner lotus-worker curio +build: lotus lotus-miner lotus-worker lotus-provider @[[ $$(type -P "lotus") ]] && echo "Caution: you have \ an existing lotus binary in your PATH. This may cause problems if you don't run 'sudo make install'" || true .PHONY: build -install: install-daemon install-miner install-worker install-curio +install: install-daemon install-miner install-worker install-provider install-daemon: install -C ./lotus /usr/local/bin/lotus @@ -138,8 +138,8 @@ install-daemon: install-miner: install -C ./lotus-miner /usr/local/bin/lotus-miner -install-curio: - install -C ./curio /usr/local/bin/curio +install-provider: + install -C ./lotus-provider /usr/local/bin/lotus-provider install-worker: install -C ./lotus-worker /usr/local/bin/lotus-worker @@ -156,8 +156,8 @@ uninstall-daemon: uninstall-miner: rm -f /usr/local/bin/lotus-miner -uninstall-curio: - rm -f /usr/local/bin/curio +uninstall-provider: + rm -f /usr/local/bin/lotus-provider uninstall-worker: rm -f /usr/local/bin/lotus-worker @@ -260,13 +260,13 @@ install-miner-service: install-miner install-daemon-service @echo "To start the service, run: 'sudo systemctl start lotus-miner'" @echo "To enable the service on startup, run: 'sudo systemctl enable lotus-miner'" -install-curio-service: install-curio install-daemon-service +install-provider-service: install-provider install-daemon-service mkdir -p /etc/systemd/system mkdir -p /var/log/lotus - install -C -m 0644 ./scripts/curio.service /etc/systemd/system/curio.service + install -C -m 0644 ./scripts/lotus-provider.service /etc/systemd/system/lotus-provider.service systemctl daemon-reload @echo - @echo "Curio service installed. Don't forget to run 'sudo systemctl start curio' to start it and 'sudo systemctl enable curio' for it to be enabled on startup." + @echo "lotus-provider service installed. Don't forget to run 'sudo systemctl start lotus-provider' to start it and 'sudo systemctl enable lotus-provider' for it to be enabled on startup." install-main-services: install-miner-service @@ -286,10 +286,10 @@ clean-miner-service: rm -f /etc/systemd/system/lotus-miner.service systemctl daemon-reload -clean-curio-service: - -systemctl stop curio - -systemctl disable curio - rm -f /etc/systemd/system/curio.service +clean-provider-service: + -systemctl stop lotus-provider + -systemctl disable lotus-provider + rm -f /etc/systemd/system/lotus-provider.service systemctl daemon-reload clean-main-services: clean-daemon-service @@ -332,7 +332,7 @@ actors-code-gen: $(GOCC) fmt ./... actors-gen: actors-code-gen - $(GOCC) run ./scripts/fiximports + ./scripts/fiximports .PHONY: actors-gen bundle-gen: @@ -366,7 +366,7 @@ docsgen-md-bin: api-gen actors-gen docsgen-openrpc-bin: api-gen actors-gen $(GOCC) build $(GOFLAGS) -o docgen-openrpc ./api/docgen-openrpc/cmd -docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker docsgen-md-curio +docsgen-md: docsgen-md-full docsgen-md-storage docsgen-md-worker docsgen-md-provider docsgen-md-full: docsgen-md-bin ./docgen-md "api/api_full.go" "FullNode" "api" "./api" > documentation/en/api-v1-unstable-methods.md @@ -375,8 +375,8 @@ docsgen-md-storage: docsgen-md-bin ./docgen-md "api/api_storage.go" "StorageMiner" "api" "./api" > documentation/en/api-v0-methods-miner.md docsgen-md-worker: docsgen-md-bin ./docgen-md "api/api_worker.go" "Worker" "api" "./api" > documentation/en/api-v0-methods-worker.md -docsgen-md-curio: docsgen-md-bin - ./docgen-md "api/api_curio.go" "Curio" "api" "./api" > documentation/en/api-v0-methods-curio.md +docsgen-md-provider: docsgen-md-bin + ./docgen-md "api/api_lp.go" "Provider" "api" "./api" > documentation/en/api-v0-methods-provider.md docsgen-openrpc: docsgen-openrpc-full docsgen-openrpc-storage docsgen-openrpc-worker docsgen-openrpc-gateway @@ -392,25 +392,25 @@ docsgen-openrpc-gateway: docsgen-openrpc-bin .PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin fiximports: - $(GOCC) run ./scripts/fiximports + ./scripts/fiximports gen: actors-code-gen type-gen cfgdoc-gen docsgen api-gen circleci - $(GOCC) run ./scripts/fiximports + ./scripts/fiximports @echo ">>> IF YOU'VE MODIFIED THE CLI OR CONFIG, REMEMBER TO ALSO RUN 'make docsgen-cli'" .PHONY: gen jen: gen -snap: lotus lotus-miner lotus-worker curio +snap: lotus lotus-miner lotus-worker lotus-provider snapcraft # snapcraft upload ./lotus_*.snap # separate from gen because it needs binaries -docsgen-cli: lotus lotus-miner lotus-worker curio +docsgen-cli: lotus lotus-miner lotus-worker lotus-provider python3 ./scripts/generate-lotus-cli.py ./lotus config default > documentation/en/default-lotus-config.toml ./lotus-miner config default > documentation/en/default-lotus-miner-config.toml - ./curio config default > documentation/en/default-curio-config.toml + ./lotus-provider config default > documentation/en/default-lotus-provider-config.toml .PHONY: docsgen-cli print-%: diff --git a/api/api_full.go b/api/api_full.go index 85233a712df..e61bb0dedef 100644 --- a/api/api_full.go +++ b/api/api_full.go @@ -906,16 +906,16 @@ type FullNode interface { // Actor events - // GetActorEventsRaw returns all user-programmed and built-in actor events that match the given + // GetActorEvents returns all user-programmed and built-in actor events that match the given // filter. // This is a request/response API. // Results available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange // configuration options and also the amount of historical data available in the node. // // This is an EXPERIMENTAL API and may be subject to change. - GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) //perm:read + GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) //perm:read - // SubscribeActorEventsRaw returns a long-lived stream of all user-programmed and built-in actor + // SubscribeActorEvents returns a long-lived stream of all user-programmed and built-in actor // events that match the given filter. // Events that match the given filter are written to the stream in real-time as they are emitted // from the FVM. @@ -929,7 +929,7 @@ type FullNode interface { // // Note: this API is only available via websocket connections. // This is an EXPERIMENTAL API and may be subject to change. - SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) //perm:read + SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) //perm:read } // reverse interface to the client, called after EthSubscribe diff --git a/api/api_gateway.go b/api/api_gateway.go index e70c00e3a26..e71a8b712fc 100644 --- a/api/api_gateway.go +++ b/api/api_gateway.go @@ -77,7 +77,6 @@ type Gateway interface { StateMarketBalance(ctx context.Context, addr address.Address, tsk types.TipSetKey) (MarketBalance, error) StateMarketStorageDeal(ctx context.Context, dealId abi.DealID, tsk types.TipSetKey) (*MarketDeal, error) StateMinerInfo(ctx context.Context, actor address.Address, tsk types.TipSetKey) (MinerInfo, error) - StateMinerDeadlines(context.Context, address.Address, types.TipSetKey) ([]Deadline, error) StateMinerProvingDeadline(ctx context.Context, addr address.Address, tsk types.TipSetKey) (*dline.Info, error) StateMinerPower(context.Context, address.Address, types.TipSetKey) (*MinerPower, error) StateNetworkName(context.Context) (dtypes.NetworkName, error) @@ -131,7 +130,6 @@ type Gateway interface { EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) - GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) - SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) - ChainGetEvents(context.Context, cid.Cid) ([]types.Event, error) + GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) + SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) } diff --git a/api/api_curio.go b/api/api_lp.go similarity index 98% rename from api/api_curio.go rename to api/api_lp.go index c94c8a9ab57..15e219fa514 100644 --- a/api/api_curio.go +++ b/api/api_lp.go @@ -12,7 +12,7 @@ import ( "github.com/filecoin-project/lotus/storage/sealer/storiface" ) -type Curio interface { +type LotusProvider interface { Version(context.Context) (Version, error) //perm:admin AllocatePieceToSector(ctx context.Context, maddr address.Address, piece PieceDealInfo, rawSize int64, source url.URL, header http.Header) (SectorOffset, error) //perm:write diff --git a/api/client/client.go b/api/client/client.go index 4a8ff927227..4d51221f92b 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -15,9 +15,9 @@ import ( "github.com/filecoin-project/lotus/lib/rpcenc" ) -// NewCurioRpc creates a new http jsonrpc client. -func NewCurioRpc(ctx context.Context, addr string, requestHeader http.Header) (api.Curio, jsonrpc.ClientCloser, error) { - var res v1api.CurioStruct +// NewProviderRpc creates a new http jsonrpc client. +func NewProviderRpc(ctx context.Context, addr string, requestHeader http.Header) (api.LotusProvider, jsonrpc.ClientCloser, error) { + var res v1api.LotusProviderStruct closer, err := jsonrpc.NewMergeClient(ctx, addr, "Filecoin", api.GetInternalStructs(&res), requestHeader, jsonrpc.WithErrors(api.RPCErrors)) diff --git a/api/docgen/docgen.go b/api/docgen/docgen.go index 2d34a0903cc..29ac1d3e8d8 100644 --- a/api/docgen/docgen.go +++ b/api/docgen/docgen.go @@ -456,10 +456,10 @@ func GetAPIType(name, pkg string) (i interface{}, t reflect.Type, permStruct []r i = &api.GatewayStruct{} t = reflect.TypeOf(new(struct{ api.Gateway })).Elem() permStruct = append(permStruct, reflect.TypeOf(api.GatewayStruct{}.Internal)) - case "Curio": - i = &api.CurioStruct{} - t = reflect.TypeOf(new(struct{ api.Curio })).Elem() - permStruct = append(permStruct, reflect.TypeOf(api.CurioStruct{}.Internal)) + case "Provider": + i = &api.LotusProviderStruct{} + t = reflect.TypeOf(new(struct{ api.LotusProvider })).Elem() + permStruct = append(permStruct, reflect.TypeOf(api.LotusProviderStruct{}.Internal)) default: panic("unknown type") } diff --git a/api/mocks/mock_full.go b/api/mocks/mock_full.go index 9960faeffe5..215ccdfebdf 100644 --- a/api/mocks/mock_full.go +++ b/api/mocks/mock_full.go @@ -1627,19 +1627,19 @@ func (mr *MockFullNodeMockRecorder) GasEstimateMessageGas(arg0, arg1, arg2, arg3 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GasEstimateMessageGas", reflect.TypeOf((*MockFullNode)(nil).GasEstimateMessageGas), arg0, arg1, arg2, arg3) } -// GetActorEventsRaw mocks base method. -func (m *MockFullNode) GetActorEventsRaw(arg0 context.Context, arg1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { +// GetActorEvents mocks base method. +func (m *MockFullNode) GetActorEvents(arg0 context.Context, arg1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetActorEventsRaw", arg0, arg1) + ret := m.ctrl.Call(m, "GetActorEvents", arg0, arg1) ret0, _ := ret[0].([]*types.ActorEvent) ret1, _ := ret[1].(error) return ret0, ret1 } -// GetActorEventsRaw indicates an expected call of GetActorEventsRaw. -func (mr *MockFullNodeMockRecorder) GetActorEventsRaw(arg0, arg1 interface{}) *gomock.Call { +// GetActorEvents indicates an expected call of GetActorEvents. +func (mr *MockFullNodeMockRecorder) GetActorEvents(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActorEventsRaw", reflect.TypeOf((*MockFullNode)(nil).GetActorEventsRaw), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetActorEvents", reflect.TypeOf((*MockFullNode)(nil).GetActorEvents), arg0, arg1) } // ID mocks base method. @@ -3954,19 +3954,19 @@ func (mr *MockFullNodeMockRecorder) StateWaitMsg(arg0, arg1, arg2, arg3, arg4 in return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StateWaitMsg", reflect.TypeOf((*MockFullNode)(nil).StateWaitMsg), arg0, arg1, arg2, arg3, arg4) } -// SubscribeActorEventsRaw mocks base method. -func (m *MockFullNode) SubscribeActorEventsRaw(arg0 context.Context, arg1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { +// SubscribeActorEvents mocks base method. +func (m *MockFullNode) SubscribeActorEvents(arg0 context.Context, arg1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "SubscribeActorEventsRaw", arg0, arg1) + ret := m.ctrl.Call(m, "SubscribeActorEvents", arg0, arg1) ret0, _ := ret[0].(<-chan *types.ActorEvent) ret1, _ := ret[1].(error) return ret0, ret1 } -// SubscribeActorEventsRaw indicates an expected call of SubscribeActorEventsRaw. -func (mr *MockFullNodeMockRecorder) SubscribeActorEventsRaw(arg0, arg1 interface{}) *gomock.Call { +// SubscribeActorEvents indicates an expected call of SubscribeActorEvents. +func (mr *MockFullNodeMockRecorder) SubscribeActorEvents(arg0, arg1 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeActorEventsRaw", reflect.TypeOf((*MockFullNode)(nil).SubscribeActorEventsRaw), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SubscribeActorEvents", reflect.TypeOf((*MockFullNode)(nil).SubscribeActorEvents), arg0, arg1) } // SyncCheckBad mocks base method. diff --git a/api/proxy_gen.go b/api/proxy_gen.go index 1cd44092e62..bd33ae445be 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -115,35 +115,6 @@ type CommonNetStub struct { NetStub } -type CurioStruct struct { - Internal CurioMethods -} - -type CurioMethods struct { - AllocatePieceToSector func(p0 context.Context, p1 address.Address, p2 PieceDealInfo, p3 int64, p4 url.URL, p5 http.Header) (SectorOffset, error) `perm:"write"` - - Shutdown func(p0 context.Context) error `perm:"admin"` - - StorageAddLocal func(p0 context.Context, p1 string) error `perm:"admin"` - - StorageDetachLocal func(p0 context.Context, p1 string) error `perm:"admin"` - - StorageFindSector func(p0 context.Context, p1 abi.SectorID, p2 storiface.SectorFileType, p3 abi.SectorSize, p4 bool) ([]storiface.SectorStorageInfo, error) `perm:"admin"` - - StorageInfo func(p0 context.Context, p1 storiface.ID) (storiface.StorageInfo, error) `perm:"admin"` - - StorageList func(p0 context.Context) (map[storiface.ID][]storiface.Decl, error) `perm:"admin"` - - StorageLocal func(p0 context.Context) (map[storiface.ID]string, error) `perm:"admin"` - - StorageStat func(p0 context.Context, p1 storiface.ID) (fsutil.FsStat, error) `perm:"admin"` - - Version func(p0 context.Context) (Version, error) `perm:"admin"` -} - -type CurioStub struct { -} - type EthSubscriberStruct struct { Internal EthSubscriberMethods } @@ -366,7 +337,7 @@ type FullNodeMethods struct { GasEstimateMessageGas func(p0 context.Context, p1 *types.Message, p2 *MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) `perm:"read"` - GetActorEventsRaw func(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) `perm:"read"` + GetActorEvents func(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) `perm:"read"` MarketAddBalance func(p0 context.Context, p1 address.Address, p2 address.Address, p3 types.BigInt) (cid.Cid, error) `perm:"sign"` @@ -618,7 +589,7 @@ type FullNodeMethods struct { StateWaitMsg func(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch, p4 bool) (*MsgLookup, error) `perm:"read"` - SubscribeActorEventsRaw func(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) `perm:"read"` + SubscribeActorEvents func(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) `perm:"read"` SyncCheckBad func(p0 context.Context, p1 cid.Cid) (string, error) `perm:"read"` @@ -682,8 +653,6 @@ type GatewayMethods struct { ChainGetBlockMessages func(p0 context.Context, p1 cid.Cid) (*BlockMessages, error) `` - ChainGetEvents func(p0 context.Context, p1 cid.Cid) ([]types.Event, error) `` - ChainGetGenesis func(p0 context.Context) (*types.TipSet, error) `` ChainGetMessage func(p0 context.Context, p1 cid.Cid) (*types.Message, error) `` @@ -788,7 +757,7 @@ type GatewayMethods struct { GasEstimateMessageGas func(p0 context.Context, p1 *types.Message, p2 *MessageSendSpec, p3 types.TipSetKey) (*types.Message, error) `` - GetActorEventsRaw func(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) `` + GetActorEvents func(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) `` MinerGetBaseInfo func(p0 context.Context, p1 address.Address, p2 abi.ChainEpoch, p3 types.TipSetKey) (*MiningBaseInfo, error) `` @@ -838,8 +807,6 @@ type GatewayMethods struct { StateMarketStorageDeal func(p0 context.Context, p1 abi.DealID, p2 types.TipSetKey) (*MarketDeal, error) `` - StateMinerDeadlines func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]Deadline, error) `` - StateMinerInfo func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (MinerInfo, error) `` StateMinerPower func(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (*MinerPower, error) `` @@ -866,7 +833,7 @@ type GatewayMethods struct { StateWaitMsg func(p0 context.Context, p1 cid.Cid, p2 uint64, p3 abi.ChainEpoch, p4 bool) (*MsgLookup, error) `` - SubscribeActorEventsRaw func(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) `` + SubscribeActorEvents func(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) `` Version func(p0 context.Context) (APIVersion, error) `` @@ -878,6 +845,35 @@ type GatewayMethods struct { type GatewayStub struct { } +type LotusProviderStruct struct { + Internal LotusProviderMethods +} + +type LotusProviderMethods struct { + AllocatePieceToSector func(p0 context.Context, p1 address.Address, p2 PieceDealInfo, p3 int64, p4 url.URL, p5 http.Header) (SectorOffset, error) `perm:"write"` + + Shutdown func(p0 context.Context) error `perm:"admin"` + + StorageAddLocal func(p0 context.Context, p1 string) error `perm:"admin"` + + StorageDetachLocal func(p0 context.Context, p1 string) error `perm:"admin"` + + StorageFindSector func(p0 context.Context, p1 abi.SectorID, p2 storiface.SectorFileType, p3 abi.SectorSize, p4 bool) ([]storiface.SectorStorageInfo, error) `perm:"admin"` + + StorageInfo func(p0 context.Context, p1 storiface.ID) (storiface.StorageInfo, error) `perm:"admin"` + + StorageList func(p0 context.Context) (map[storiface.ID][]storiface.Decl, error) `perm:"admin"` + + StorageLocal func(p0 context.Context) (map[storiface.ID]string, error) `perm:"admin"` + + StorageStat func(p0 context.Context, p1 storiface.ID) (fsutil.FsStat, error) `perm:"admin"` + + Version func(p0 context.Context) (Version, error) `perm:"admin"` +} + +type LotusProviderStub struct { +} + type NetStruct struct { Internal NetMethods } @@ -1488,116 +1484,6 @@ func (s *CommonStub) Version(p0 context.Context) (APIVersion, error) { return *new(APIVersion), ErrNotSupported } -func (s *CurioStruct) AllocatePieceToSector(p0 context.Context, p1 address.Address, p2 PieceDealInfo, p3 int64, p4 url.URL, p5 http.Header) (SectorOffset, error) { - if s.Internal.AllocatePieceToSector == nil { - return *new(SectorOffset), ErrNotSupported - } - return s.Internal.AllocatePieceToSector(p0, p1, p2, p3, p4, p5) -} - -func (s *CurioStub) AllocatePieceToSector(p0 context.Context, p1 address.Address, p2 PieceDealInfo, p3 int64, p4 url.URL, p5 http.Header) (SectorOffset, error) { - return *new(SectorOffset), ErrNotSupported -} - -func (s *CurioStruct) Shutdown(p0 context.Context) error { - if s.Internal.Shutdown == nil { - return ErrNotSupported - } - return s.Internal.Shutdown(p0) -} - -func (s *CurioStub) Shutdown(p0 context.Context) error { - return ErrNotSupported -} - -func (s *CurioStruct) StorageAddLocal(p0 context.Context, p1 string) error { - if s.Internal.StorageAddLocal == nil { - return ErrNotSupported - } - return s.Internal.StorageAddLocal(p0, p1) -} - -func (s *CurioStub) StorageAddLocal(p0 context.Context, p1 string) error { - return ErrNotSupported -} - -func (s *CurioStruct) StorageDetachLocal(p0 context.Context, p1 string) error { - if s.Internal.StorageDetachLocal == nil { - return ErrNotSupported - } - return s.Internal.StorageDetachLocal(p0, p1) -} - -func (s *CurioStub) StorageDetachLocal(p0 context.Context, p1 string) error { - return ErrNotSupported -} - -func (s *CurioStruct) StorageFindSector(p0 context.Context, p1 abi.SectorID, p2 storiface.SectorFileType, p3 abi.SectorSize, p4 bool) ([]storiface.SectorStorageInfo, error) { - if s.Internal.StorageFindSector == nil { - return *new([]storiface.SectorStorageInfo), ErrNotSupported - } - return s.Internal.StorageFindSector(p0, p1, p2, p3, p4) -} - -func (s *CurioStub) StorageFindSector(p0 context.Context, p1 abi.SectorID, p2 storiface.SectorFileType, p3 abi.SectorSize, p4 bool) ([]storiface.SectorStorageInfo, error) { - return *new([]storiface.SectorStorageInfo), ErrNotSupported -} - -func (s *CurioStruct) StorageInfo(p0 context.Context, p1 storiface.ID) (storiface.StorageInfo, error) { - if s.Internal.StorageInfo == nil { - return *new(storiface.StorageInfo), ErrNotSupported - } - return s.Internal.StorageInfo(p0, p1) -} - -func (s *CurioStub) StorageInfo(p0 context.Context, p1 storiface.ID) (storiface.StorageInfo, error) { - return *new(storiface.StorageInfo), ErrNotSupported -} - -func (s *CurioStruct) StorageList(p0 context.Context) (map[storiface.ID][]storiface.Decl, error) { - if s.Internal.StorageList == nil { - return *new(map[storiface.ID][]storiface.Decl), ErrNotSupported - } - return s.Internal.StorageList(p0) -} - -func (s *CurioStub) StorageList(p0 context.Context) (map[storiface.ID][]storiface.Decl, error) { - return *new(map[storiface.ID][]storiface.Decl), ErrNotSupported -} - -func (s *CurioStruct) StorageLocal(p0 context.Context) (map[storiface.ID]string, error) { - if s.Internal.StorageLocal == nil { - return *new(map[storiface.ID]string), ErrNotSupported - } - return s.Internal.StorageLocal(p0) -} - -func (s *CurioStub) StorageLocal(p0 context.Context) (map[storiface.ID]string, error) { - return *new(map[storiface.ID]string), ErrNotSupported -} - -func (s *CurioStruct) StorageStat(p0 context.Context, p1 storiface.ID) (fsutil.FsStat, error) { - if s.Internal.StorageStat == nil { - return *new(fsutil.FsStat), ErrNotSupported - } - return s.Internal.StorageStat(p0, p1) -} - -func (s *CurioStub) StorageStat(p0 context.Context, p1 storiface.ID) (fsutil.FsStat, error) { - return *new(fsutil.FsStat), ErrNotSupported -} - -func (s *CurioStruct) Version(p0 context.Context) (Version, error) { - if s.Internal.Version == nil { - return *new(Version), ErrNotSupported - } - return s.Internal.Version(p0) -} - -func (s *CurioStub) Version(p0 context.Context) (Version, error) { - return *new(Version), ErrNotSupported -} - func (s *EthSubscriberStruct) EthSubscription(p0 context.Context, p1 jsonrpc.RawParams) error { if s.Internal.EthSubscription == nil { return ErrNotSupported @@ -2720,14 +2606,14 @@ func (s *FullNodeStub) GasEstimateMessageGas(p0 context.Context, p1 *types.Messa return nil, ErrNotSupported } -func (s *FullNodeStruct) GetActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { - if s.Internal.GetActorEventsRaw == nil { +func (s *FullNodeStruct) GetActorEvents(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { + if s.Internal.GetActorEvents == nil { return *new([]*types.ActorEvent), ErrNotSupported } - return s.Internal.GetActorEventsRaw(p0, p1) + return s.Internal.GetActorEvents(p0, p1) } -func (s *FullNodeStub) GetActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { +func (s *FullNodeStub) GetActorEvents(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { return *new([]*types.ActorEvent), ErrNotSupported } @@ -4106,14 +3992,14 @@ func (s *FullNodeStub) StateWaitMsg(p0 context.Context, p1 cid.Cid, p2 uint64, p return nil, ErrNotSupported } -func (s *FullNodeStruct) SubscribeActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { - if s.Internal.SubscribeActorEventsRaw == nil { +func (s *FullNodeStruct) SubscribeActorEvents(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { + if s.Internal.SubscribeActorEvents == nil { return nil, ErrNotSupported } - return s.Internal.SubscribeActorEventsRaw(p0, p1) + return s.Internal.SubscribeActorEvents(p0, p1) } -func (s *FullNodeStub) SubscribeActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { +func (s *FullNodeStub) SubscribeActorEvents(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { return nil, ErrNotSupported } @@ -4392,17 +4278,6 @@ func (s *GatewayStub) ChainGetBlockMessages(p0 context.Context, p1 cid.Cid) (*Bl return nil, ErrNotSupported } -func (s *GatewayStruct) ChainGetEvents(p0 context.Context, p1 cid.Cid) ([]types.Event, error) { - if s.Internal.ChainGetEvents == nil { - return *new([]types.Event), ErrNotSupported - } - return s.Internal.ChainGetEvents(p0, p1) -} - -func (s *GatewayStub) ChainGetEvents(p0 context.Context, p1 cid.Cid) ([]types.Event, error) { - return *new([]types.Event), ErrNotSupported -} - func (s *GatewayStruct) ChainGetGenesis(p0 context.Context) (*types.TipSet, error) { if s.Internal.ChainGetGenesis == nil { return nil, ErrNotSupported @@ -4975,14 +4850,14 @@ func (s *GatewayStub) GasEstimateMessageGas(p0 context.Context, p1 *types.Messag return nil, ErrNotSupported } -func (s *GatewayStruct) GetActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { - if s.Internal.GetActorEventsRaw == nil { +func (s *GatewayStruct) GetActorEvents(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { + if s.Internal.GetActorEvents == nil { return *new([]*types.ActorEvent), ErrNotSupported } - return s.Internal.GetActorEventsRaw(p0, p1) + return s.Internal.GetActorEvents(p0, p1) } -func (s *GatewayStub) GetActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { +func (s *GatewayStub) GetActorEvents(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) { return *new([]*types.ActorEvent), ErrNotSupported } @@ -5250,17 +5125,6 @@ func (s *GatewayStub) StateMarketStorageDeal(p0 context.Context, p1 abi.DealID, return nil, ErrNotSupported } -func (s *GatewayStruct) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]Deadline, error) { - if s.Internal.StateMinerDeadlines == nil { - return *new([]Deadline), ErrNotSupported - } - return s.Internal.StateMinerDeadlines(p0, p1, p2) -} - -func (s *GatewayStub) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]Deadline, error) { - return *new([]Deadline), ErrNotSupported -} - func (s *GatewayStruct) StateMinerInfo(p0 context.Context, p1 address.Address, p2 types.TipSetKey) (MinerInfo, error) { if s.Internal.StateMinerInfo == nil { return *new(MinerInfo), ErrNotSupported @@ -5404,14 +5268,14 @@ func (s *GatewayStub) StateWaitMsg(p0 context.Context, p1 cid.Cid, p2 uint64, p3 return nil, ErrNotSupported } -func (s *GatewayStruct) SubscribeActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { - if s.Internal.SubscribeActorEventsRaw == nil { +func (s *GatewayStruct) SubscribeActorEvents(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { + if s.Internal.SubscribeActorEvents == nil { return nil, ErrNotSupported } - return s.Internal.SubscribeActorEventsRaw(p0, p1) + return s.Internal.SubscribeActorEvents(p0, p1) } -func (s *GatewayStub) SubscribeActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { +func (s *GatewayStub) SubscribeActorEvents(p0 context.Context, p1 *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { return nil, ErrNotSupported } @@ -5448,6 +5312,116 @@ func (s *GatewayStub) Web3ClientVersion(p0 context.Context) (string, error) { return "", ErrNotSupported } +func (s *LotusProviderStruct) AllocatePieceToSector(p0 context.Context, p1 address.Address, p2 PieceDealInfo, p3 int64, p4 url.URL, p5 http.Header) (SectorOffset, error) { + if s.Internal.AllocatePieceToSector == nil { + return *new(SectorOffset), ErrNotSupported + } + return s.Internal.AllocatePieceToSector(p0, p1, p2, p3, p4, p5) +} + +func (s *LotusProviderStub) AllocatePieceToSector(p0 context.Context, p1 address.Address, p2 PieceDealInfo, p3 int64, p4 url.URL, p5 http.Header) (SectorOffset, error) { + return *new(SectorOffset), ErrNotSupported +} + +func (s *LotusProviderStruct) Shutdown(p0 context.Context) error { + if s.Internal.Shutdown == nil { + return ErrNotSupported + } + return s.Internal.Shutdown(p0) +} + +func (s *LotusProviderStub) Shutdown(p0 context.Context) error { + return ErrNotSupported +} + +func (s *LotusProviderStruct) StorageAddLocal(p0 context.Context, p1 string) error { + if s.Internal.StorageAddLocal == nil { + return ErrNotSupported + } + return s.Internal.StorageAddLocal(p0, p1) +} + +func (s *LotusProviderStub) StorageAddLocal(p0 context.Context, p1 string) error { + return ErrNotSupported +} + +func (s *LotusProviderStruct) StorageDetachLocal(p0 context.Context, p1 string) error { + if s.Internal.StorageDetachLocal == nil { + return ErrNotSupported + } + return s.Internal.StorageDetachLocal(p0, p1) +} + +func (s *LotusProviderStub) StorageDetachLocal(p0 context.Context, p1 string) error { + return ErrNotSupported +} + +func (s *LotusProviderStruct) StorageFindSector(p0 context.Context, p1 abi.SectorID, p2 storiface.SectorFileType, p3 abi.SectorSize, p4 bool) ([]storiface.SectorStorageInfo, error) { + if s.Internal.StorageFindSector == nil { + return *new([]storiface.SectorStorageInfo), ErrNotSupported + } + return s.Internal.StorageFindSector(p0, p1, p2, p3, p4) +} + +func (s *LotusProviderStub) StorageFindSector(p0 context.Context, p1 abi.SectorID, p2 storiface.SectorFileType, p3 abi.SectorSize, p4 bool) ([]storiface.SectorStorageInfo, error) { + return *new([]storiface.SectorStorageInfo), ErrNotSupported +} + +func (s *LotusProviderStruct) StorageInfo(p0 context.Context, p1 storiface.ID) (storiface.StorageInfo, error) { + if s.Internal.StorageInfo == nil { + return *new(storiface.StorageInfo), ErrNotSupported + } + return s.Internal.StorageInfo(p0, p1) +} + +func (s *LotusProviderStub) StorageInfo(p0 context.Context, p1 storiface.ID) (storiface.StorageInfo, error) { + return *new(storiface.StorageInfo), ErrNotSupported +} + +func (s *LotusProviderStruct) StorageList(p0 context.Context) (map[storiface.ID][]storiface.Decl, error) { + if s.Internal.StorageList == nil { + return *new(map[storiface.ID][]storiface.Decl), ErrNotSupported + } + return s.Internal.StorageList(p0) +} + +func (s *LotusProviderStub) StorageList(p0 context.Context) (map[storiface.ID][]storiface.Decl, error) { + return *new(map[storiface.ID][]storiface.Decl), ErrNotSupported +} + +func (s *LotusProviderStruct) StorageLocal(p0 context.Context) (map[storiface.ID]string, error) { + if s.Internal.StorageLocal == nil { + return *new(map[storiface.ID]string), ErrNotSupported + } + return s.Internal.StorageLocal(p0) +} + +func (s *LotusProviderStub) StorageLocal(p0 context.Context) (map[storiface.ID]string, error) { + return *new(map[storiface.ID]string), ErrNotSupported +} + +func (s *LotusProviderStruct) StorageStat(p0 context.Context, p1 storiface.ID) (fsutil.FsStat, error) { + if s.Internal.StorageStat == nil { + return *new(fsutil.FsStat), ErrNotSupported + } + return s.Internal.StorageStat(p0, p1) +} + +func (s *LotusProviderStub) StorageStat(p0 context.Context, p1 storiface.ID) (fsutil.FsStat, error) { + return *new(fsutil.FsStat), ErrNotSupported +} + +func (s *LotusProviderStruct) Version(p0 context.Context) (Version, error) { + if s.Internal.Version == nil { + return *new(Version), ErrNotSupported + } + return s.Internal.Version(p0) +} + +func (s *LotusProviderStub) Version(p0 context.Context) (Version, error) { + return *new(Version), ErrNotSupported +} + func (s *NetStruct) ID(p0 context.Context) (peer.ID, error) { if s.Internal.ID == nil { return *new(peer.ID), ErrNotSupported @@ -7673,10 +7647,10 @@ func (s *WorkerStub) WaitQuiet(p0 context.Context) error { var _ ChainIO = new(ChainIOStruct) var _ Common = new(CommonStruct) var _ CommonNet = new(CommonNetStruct) -var _ Curio = new(CurioStruct) var _ EthSubscriber = new(EthSubscriberStruct) var _ FullNode = new(FullNodeStruct) var _ Gateway = new(GatewayStruct) +var _ LotusProvider = new(LotusProviderStruct) var _ Net = new(NetStruct) var _ Signable = new(SignableStruct) var _ StorageMiner = new(StorageMinerStruct) diff --git a/api/v1api/latest.go b/api/v1api/latest.go index a1e63b6ada7..b8eeed2de57 100644 --- a/api/v1api/latest.go +++ b/api/v1api/latest.go @@ -13,4 +13,4 @@ func PermissionedFullAPI(a FullNode) FullNode { return api.PermissionedFullAPI(a) } -type CurioStruct = api.CurioStruct +type LotusProviderStruct = api.LotusProviderStruct diff --git a/api/version.go b/api/version.go index 124f53dabfb..e968bf93bc4 100644 --- a/api/version.go +++ b/api/version.go @@ -60,7 +60,7 @@ var ( MinerAPIVersion0 = newVer(1, 5, 0) WorkerAPIVersion0 = newVer(1, 7, 0) - CurioAPIVersion0 = newVer(1, 0, 0) + ProviderAPIVersion0 = newVer(1, 0, 0) ) //nolint:varcheck,deadcode diff --git a/build/openrpc/full.json b/build/openrpc/full.json index 35e2fd9e421..fec670a4179 100644 --- a/build/openrpc/full.json +++ b/build/openrpc/full.json @@ -37,7 +37,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1612" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1498" } }, { @@ -60,7 +60,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1623" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1509" } }, { @@ -103,7 +103,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1634" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1520" } }, { @@ -214,7 +214,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1656" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1542" } }, { @@ -454,7 +454,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1667" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1553" } }, { @@ -685,7 +685,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1678" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1564" } }, { @@ -784,7 +784,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1689" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1575" } }, { @@ -816,7 +816,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1700" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1586" } }, { @@ -922,7 +922,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1711" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1597" } }, { @@ -1019,7 +1019,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1722" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1608" } }, { @@ -1078,7 +1078,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1733" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1619" } }, { @@ -1171,7 +1171,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1744" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1630" } }, { @@ -1255,7 +1255,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1755" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1641" } }, { @@ -1355,7 +1355,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1766" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1652" } }, { @@ -1411,7 +1411,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1777" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1663" } }, { @@ -1484,7 +1484,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1788" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1674" } }, { @@ -1557,7 +1557,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1799" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1685" } }, { @@ -1604,7 +1604,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1810" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1696" } }, { @@ -1636,7 +1636,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1821" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1707" } }, { @@ -1691,7 +1691,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1832" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1718" } }, { @@ -1743,7 +1743,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1854" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1740" } }, { @@ -1780,7 +1780,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1865" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1751" } }, { @@ -1827,7 +1827,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1876" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1762" } }, { @@ -1874,7 +1874,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1887" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1773" } }, { @@ -1954,7 +1954,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1898" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1784" } }, { @@ -2006,7 +2006,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1909" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1795" } }, { @@ -2065,7 +2065,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1920" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1806" } }, { @@ -2136,7 +2136,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1931" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1817" } }, { @@ -2177,7 +2177,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1942" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1828" } }, { @@ -2245,7 +2245,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1964" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1850" } }, { @@ -2306,7 +2306,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1975" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1861" } }, { @@ -2413,7 +2413,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1986" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1872" } }, { @@ -2569,7 +2569,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1997" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1883" } }, { @@ -2635,7 +2635,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2008" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1894" } }, { @@ -2976,7 +2976,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2019" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1905" } }, { @@ -3021,7 +3021,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2030" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1916" } }, { @@ -3068,7 +3068,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2063" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1949" } }, { @@ -3139,7 +3139,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2074" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1960" } }, { @@ -3282,7 +3282,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2085" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1971" } }, { @@ -3612,7 +3612,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2096" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1982" } }, { @@ -3680,7 +3680,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2107" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L1993" } }, { @@ -3914,7 +3914,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2118" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2004" } }, { @@ -4077,7 +4077,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2129" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2015" } }, { @@ -4160,7 +4160,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2140" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2026" } }, { @@ -4201,7 +4201,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2151" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2037" } }, { @@ -4272,7 +4272,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2162" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2048" } }, { @@ -4416,7 +4416,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2173" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2059" } }, { @@ -4456,7 +4456,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2184" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2070" } }, { @@ -4497,7 +4497,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2195" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2081" } }, { @@ -4622,7 +4622,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2206" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2092" } }, { @@ -4747,7 +4747,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2217" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2103" } }, { @@ -4786,7 +4786,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2228" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2114" } }, { @@ -4833,7 +4833,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2239" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2125" } }, { @@ -4888,7 +4888,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2250" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2136" } }, { @@ -4917,7 +4917,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2261" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2147" } }, { @@ -5054,7 +5054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2272" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2158" } }, { @@ -5083,7 +5083,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2283" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2169" } }, { @@ -5137,7 +5137,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2294" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2180" } }, { @@ -5228,7 +5228,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2305" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2191" } }, { @@ -5256,7 +5256,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2316" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2202" } }, { @@ -5346,7 +5346,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2327" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2213" } }, { @@ -5602,7 +5602,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2338" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2224" } }, { @@ -5847,7 +5847,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2349" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2235" } }, { @@ -5903,7 +5903,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2360" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2246" } }, { @@ -5950,7 +5950,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2371" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2257" } }, { @@ -6048,7 +6048,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2382" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2268" } }, { @@ -6114,7 +6114,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2393" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2279" } }, { @@ -6180,7 +6180,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2404" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2290" } }, { @@ -6289,7 +6289,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2415" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2301" } }, { @@ -6347,7 +6347,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2426" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2312" } }, { @@ -6469,7 +6469,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2437" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2323" } }, { @@ -6673,7 +6673,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2448" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2334" } }, { @@ -6868,7 +6868,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2459" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2345" } }, { @@ -7055,7 +7055,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2470" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2356" } }, { @@ -7259,7 +7259,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2481" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2367" } }, { @@ -7350,7 +7350,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2492" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2378" } }, { @@ -7408,7 +7408,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2503" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2389" } }, { @@ -7666,7 +7666,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2514" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2400" } }, { @@ -7941,7 +7941,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2525" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2411" } }, { @@ -7969,7 +7969,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2536" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2422" } }, { @@ -8007,7 +8007,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2547" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2433" } }, { @@ -8115,7 +8115,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2558" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2444" } }, { @@ -8153,7 +8153,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2569" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2455" } }, { @@ -8182,7 +8182,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2580" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2466" } }, { @@ -8245,7 +8245,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2591" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2477" } }, { @@ -8308,7 +8308,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2602" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2488" } }, { @@ -8353,7 +8353,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2613" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2499" } }, { @@ -8475,7 +8475,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2624" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2510" } }, { @@ -8630,7 +8630,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2635" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2521" } }, { @@ -8684,7 +8684,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2646" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2532" } }, { @@ -8738,7 +8738,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2657" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2543" } }, { @@ -8793,7 +8793,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2668" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2554" } }, { @@ -8936,7 +8936,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2679" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2565" } }, { @@ -9063,7 +9063,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2690" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2576" } }, { @@ -9165,7 +9165,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2701" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2587" } }, { @@ -9388,13 +9388,13 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2712" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2598" } }, { - "name": "Filecoin.GetActorEventsRaw", - "description": "```go\nfunc (s *FullNodeStruct) GetActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) {\n\tif s.Internal.GetActorEventsRaw == nil {\n\t\treturn *new([]*types.ActorEvent), ErrNotSupported\n\t}\n\treturn s.Internal.GetActorEventsRaw(p0, p1)\n}\n```", - "summary": "GetActorEventsRaw returns all user-programmed and built-in actor events that match the given\nfilter.\nThis is a request/response API.\nResults available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange\nconfiguration options and also the amount of historical data available in the node.\n\nThis is an EXPERIMENTAL API and may be subject to change.\n", + "name": "Filecoin.GetActorEvents", + "description": "```go\nfunc (s *FullNodeStruct) GetActorEvents(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) {\n\tif s.Internal.GetActorEvents == nil {\n\t\treturn *new([]*types.ActorEvent), ErrNotSupported\n\t}\n\treturn s.Internal.GetActorEvents(p0, p1)\n}\n```", + "summary": "GetActorEvents returns all user-programmed and built-in actor events that match the given\nfilter.\nThis is a request/response API.\nResults available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange\nconfiguration options and also the amount of historical data available in the node.\n\nThis is an EXPERIMENTAL API and may be subject to change.\n", "paramStructure": "by-position", "params": [ { @@ -9571,7 +9571,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2723" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2609" } }, { @@ -9651,7 +9651,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2734" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2620" } }, { @@ -9696,7 +9696,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2745" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2631" } }, { @@ -9752,7 +9752,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2756" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2642" } }, { @@ -9832,7 +9832,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2767" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2653" } }, { @@ -9912,7 +9912,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2778" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2664" } }, { @@ -10397,7 +10397,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2789" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2675" } }, { @@ -10591,7 +10591,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2800" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2686" } }, { @@ -10746,7 +10746,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2811" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2697" } }, { @@ -10995,7 +10995,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2822" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2708" } }, { @@ -11150,7 +11150,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2833" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2719" } }, { @@ -11327,7 +11327,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2844" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2730" } }, { @@ -11425,7 +11425,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2855" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2741" } }, { @@ -11590,7 +11590,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2866" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2752" } }, { @@ -11629,7 +11629,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2877" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2763" } }, { @@ -11694,7 +11694,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2888" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2774" } }, { @@ -11740,7 +11740,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2899" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2785" } }, { @@ -11890,7 +11890,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2910" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2796" } }, { @@ -12027,7 +12027,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2921" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2807" } }, { @@ -12258,7 +12258,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2932" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2818" } }, { @@ -12395,7 +12395,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2943" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2829" } }, { @@ -12560,7 +12560,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2954" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2840" } }, { @@ -12637,7 +12637,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2965" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2851" } }, { @@ -12832,7 +12832,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2987" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2873" } }, { @@ -13011,7 +13011,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2998" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2884" } }, { @@ -13173,7 +13173,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3009" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2895" } }, { @@ -13321,7 +13321,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3020" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2906" } }, { @@ -13549,7 +13549,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3031" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2917" } }, { @@ -13697,7 +13697,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3042" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2928" } }, { @@ -13909,7 +13909,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3053" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2939" } }, { @@ -14115,7 +14115,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3064" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2950" } }, { @@ -14183,7 +14183,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3075" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2961" } }, { @@ -14300,7 +14300,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3086" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2972" } }, { @@ -14391,7 +14391,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3097" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2983" } }, { @@ -14477,7 +14477,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3108" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L2994" } }, { @@ -14672,7 +14672,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3119" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3005" } }, { @@ -14834,7 +14834,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3130" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3016" } }, { @@ -15030,7 +15030,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3141" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3027" } }, { @@ -15210,7 +15210,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3152" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3038" } }, { @@ -15373,7 +15373,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3163" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3049" } }, { @@ -15400,7 +15400,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3174" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3060" } }, { @@ -15427,7 +15427,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3185" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3071" } }, { @@ -15526,7 +15526,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3196" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3082" } }, { @@ -15572,7 +15572,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3207" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3093" } }, { @@ -15672,7 +15672,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3218" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3104" } }, { @@ -15788,7 +15788,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3229" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3115" } }, { @@ -15836,7 +15836,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3240" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3126" } }, { @@ -15928,7 +15928,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3251" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3137" } }, { @@ -16043,7 +16043,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3262" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3148" } }, { @@ -16091,7 +16091,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3273" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3159" } }, { @@ -16128,7 +16128,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3284" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3170" } }, { @@ -16400,7 +16400,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3295" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3181" } }, { @@ -16448,7 +16448,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3306" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3192" } }, { @@ -16506,7 +16506,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3317" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3203" } }, { @@ -16711,7 +16711,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3328" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3214" } }, { @@ -16914,7 +16914,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3339" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3225" } }, { @@ -17083,7 +17083,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3350" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3236" } }, { @@ -17287,7 +17287,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3361" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3247" } }, { @@ -17454,7 +17454,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3372" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3258" } }, { @@ -17661,7 +17661,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3383" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3269" } }, { @@ -17729,7 +17729,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3394" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3280" } }, { @@ -17781,7 +17781,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3405" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3291" } }, { @@ -17830,7 +17830,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3416" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3302" } }, { @@ -17921,7 +17921,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3427" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3313" } }, { @@ -18427,7 +18427,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3438" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3324" } }, { @@ -18533,7 +18533,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3449" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3335" } }, { @@ -18585,7 +18585,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3460" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3346" } }, { @@ -19137,7 +19137,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3471" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3357" } }, { @@ -19251,7 +19251,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3482" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3368" } }, { @@ -19348,7 +19348,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3493" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3379" } }, { @@ -19448,7 +19448,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3504" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3390" } }, { @@ -19536,7 +19536,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3515" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3401" } }, { @@ -19636,7 +19636,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3526" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3412" } }, { @@ -19723,7 +19723,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3537" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3423" } }, { @@ -19814,7 +19814,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3548" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3434" } }, { @@ -19939,7 +19939,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3559" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3445" } }, { @@ -20048,7 +20048,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3570" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3456" } }, { @@ -20118,7 +20118,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3581" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3467" } }, { @@ -20221,7 +20221,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3592" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3478" } }, { @@ -20282,7 +20282,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3603" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3489" } }, { @@ -20412,7 +20412,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3614" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3500" } }, { @@ -20519,7 +20519,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3625" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3511" } }, { @@ -20728,7 +20728,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3636" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3522" } }, { @@ -20805,7 +20805,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3647" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3533" } }, { @@ -20882,7 +20882,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3658" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3544" } }, { @@ -20991,7 +20991,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3669" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3555" } }, { @@ -21100,7 +21100,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3680" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3566" } }, { @@ -21161,7 +21161,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3691" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3577" } }, { @@ -21271,7 +21271,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3702" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3588" } }, { @@ -21332,7 +21332,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3713" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3599" } }, { @@ -21400,7 +21400,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3724" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3610" } }, { @@ -21468,7 +21468,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3735" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3621" } }, { @@ -21549,7 +21549,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3746" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3632" } }, { @@ -21698,7 +21698,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3757" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3643" } }, { @@ -21770,7 +21770,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3768" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3654" } }, { @@ -21929,7 +21929,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3779" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3665" } }, { @@ -22094,7 +22094,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3790" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3676" } }, { @@ -22164,7 +22164,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3801" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3687" } }, { @@ -22232,7 +22232,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3812" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3698" } }, { @@ -22325,7 +22325,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3823" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3709" } }, { @@ -22396,7 +22396,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3834" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3720" } }, { @@ -22597,7 +22597,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3845" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3731" } }, { @@ -22729,7 +22729,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3856" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3742" } }, { @@ -22866,7 +22866,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3867" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3753" } }, { @@ -22977,7 +22977,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3878" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3764" } }, { @@ -23109,7 +23109,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3889" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3775" } }, { @@ -23240,7 +23240,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3900" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3786" } }, { @@ -23311,7 +23311,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3911" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3797" } }, { @@ -23395,7 +23395,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3922" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3808" } }, { @@ -23481,7 +23481,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3933" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3819" } }, { @@ -23664,7 +23664,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3944" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3830" } }, { @@ -23691,7 +23691,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3955" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3841" } }, { @@ -23744,7 +23744,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3966" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3852" } }, { @@ -23832,7 +23832,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3977" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3863" } }, { @@ -24283,7 +24283,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3988" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3874" } }, { @@ -24450,7 +24450,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3999" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3885" } }, { @@ -24548,7 +24548,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4010" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3896" } }, { @@ -24721,7 +24721,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4021" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3907" } }, { @@ -24819,7 +24819,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4032" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3918" } }, { @@ -24970,7 +24970,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4043" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3929" } }, { @@ -25055,7 +25055,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4054" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3940" } }, { @@ -25123,7 +25123,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4065" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3951" } }, { @@ -25175,7 +25175,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4076" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3962" } }, { @@ -25243,7 +25243,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4087" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3973" } }, { @@ -25404,7 +25404,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4098" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L3984" } }, { @@ -25451,7 +25451,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4120" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4006" } }, { @@ -25498,7 +25498,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4131" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4017" } }, { @@ -25541,7 +25541,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4153" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4039" } }, { @@ -25637,7 +25637,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4164" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4050" } }, { @@ -25903,7 +25903,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4175" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4061" } }, { @@ -25926,7 +25926,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4186" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4072" } }, { @@ -25969,7 +25969,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4197" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4083" } }, { @@ -26020,7 +26020,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4208" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4094" } }, { @@ -26065,7 +26065,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4219" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4105" } }, { @@ -26093,7 +26093,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4230" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4116" } }, { @@ -26133,7 +26133,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4241" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4127" } }, { @@ -26192,7 +26192,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4252" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4138" } }, { @@ -26236,7 +26236,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4263" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4149" } }, { @@ -26295,7 +26295,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4274" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4160" } }, { @@ -26332,7 +26332,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4285" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4171" } }, { @@ -26376,7 +26376,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4296" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4182" } }, { @@ -26416,7 +26416,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4307" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4193" } }, { @@ -26491,7 +26491,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4318" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4204" } }, { @@ -26699,7 +26699,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4329" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4215" } }, { @@ -26743,7 +26743,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4340" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4226" } }, { @@ -26833,7 +26833,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4351" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4237" } }, { @@ -26860,7 +26860,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4362" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4248" } } ] diff --git a/build/openrpc/gateway.json b/build/openrpc/gateway.json index 039648e5977..8c0f3e68b5a 100644 --- a/build/openrpc/gateway.json +++ b/build/openrpc/gateway.json @@ -242,7 +242,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4373" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4259" } }, { @@ -473,106 +473,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4384" - } - }, - { - "name": "Filecoin.ChainGetEvents", - "description": "```go\nfunc (s *GatewayStruct) ChainGetEvents(p0 context.Context, p1 cid.Cid) ([]types.Event, error) {\n\tif s.Internal.ChainGetEvents == nil {\n\t\treturn *new([]types.Event), ErrNotSupported\n\t}\n\treturn s.Internal.ChainGetEvents(p0, p1)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "cid.Cid", - "summary": "", - "schema": { - "title": "Content Identifier", - "description": "Cid represents a self-describing content addressed identifier. It is formed by a Version, a Codec (which indicates a multicodec-packed content type) and a Multihash.", - "examples": [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - } - ], - "type": [ - "string" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "[]types.Event", - "description": "[]types.Event", - "summary": "", - "schema": { - "examples": [ - [ - { - "Emitter": 1000, - "Entries": [ - { - "Flags": 7, - "Key": "string value", - "Codec": 42, - "Value": "Ynl0ZSBhcnJheQ==" - } - ] - } - ] - ], - "items": [ - { - "additionalProperties": false, - "properties": { - "Emitter": { - "title": "number", - "type": "number" - }, - "Entries": { - "items": { - "additionalProperties": false, - "properties": { - "Codec": { - "title": "number", - "type": "number" - }, - "Flags": { - "title": "number", - "type": "number" - }, - "Key": { - "type": "string" - }, - "Value": { - "media": { - "binaryEncoding": "base64" - }, - "type": "string" - } - }, - "type": "object" - }, - "type": "array" - } - }, - "type": [ - "object" - ] - } - ], - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4395" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4270" } }, { @@ -604,7 +505,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4406" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4281" } }, { @@ -710,7 +611,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4417" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4292" } }, { @@ -803,7 +704,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4428" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4303" } }, { @@ -887,7 +788,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4439" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4314" } }, { @@ -987,7 +888,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4450" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4325" } }, { @@ -1043,7 +944,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4461" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4336" } }, { @@ -1116,7 +1017,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4472" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4347" } }, { @@ -1189,7 +1090,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4483" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4358" } }, { @@ -1236,7 +1137,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4494" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4369" } }, { @@ -1268,7 +1169,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4505" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4380" } }, { @@ -1305,7 +1206,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4527" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4402" } }, { @@ -1352,7 +1253,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4538" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4413" } }, { @@ -1392,7 +1293,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4549" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4424" } }, { @@ -1439,7 +1340,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4560" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4435" } }, { @@ -1468,7 +1369,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4571" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4446" } }, { @@ -1605,7 +1506,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4582" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4457" } }, { @@ -1634,7 +1535,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4593" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4468" } }, { @@ -1688,7 +1589,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4604" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4479" } }, { @@ -1779,7 +1680,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4615" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4490" } }, { @@ -1807,7 +1708,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4626" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4501" } }, { @@ -1897,7 +1798,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4637" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4512" } }, { @@ -2153,7 +2054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4648" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4523" } }, { @@ -2398,7 +2299,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4659" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4534" } }, { @@ -2454,7 +2355,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4670" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4545" } }, { @@ -2501,7 +2402,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4681" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4556" } }, { @@ -2599,7 +2500,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4692" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4567" } }, { @@ -2665,7 +2566,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4703" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4578" } }, { @@ -2731,7 +2632,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4714" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4589" } }, { @@ -2840,7 +2741,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4725" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4600" } }, { @@ -2898,7 +2799,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4736" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4611" } }, { @@ -3020,7 +2921,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4747" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4622" } }, { @@ -3207,7 +3108,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4758" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4633" } }, { @@ -3411,7 +3312,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4769" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4644" } }, { @@ -3502,7 +3403,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4780" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4655" } }, { @@ -3560,7 +3461,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4791" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4666" } }, { @@ -3818,7 +3719,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4802" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4677" } }, { @@ -4093,7 +3994,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4813" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4688" } }, { @@ -4121,7 +4022,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4824" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4699" } }, { @@ -4159,7 +4060,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4835" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4710" } }, { @@ -4267,7 +4168,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4846" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4721" } }, { @@ -4305,7 +4206,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4857" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4732" } }, { @@ -4334,7 +4235,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4868" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4743" } }, { @@ -4397,7 +4298,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4879" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4754" } }, { @@ -4460,7 +4361,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4890" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4765" } }, { @@ -4505,7 +4406,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4901" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4776" } }, { @@ -4627,7 +4528,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4912" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4787" } }, { @@ -4782,7 +4683,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4923" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4798" } }, { @@ -4836,7 +4737,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4934" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4809" } }, { @@ -4890,7 +4791,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4945" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4820" } }, { @@ -4992,7 +4893,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4956" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4831" } }, { @@ -5215,12 +5116,12 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4967" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4842" } }, { - "name": "Filecoin.GetActorEventsRaw", - "description": "```go\nfunc (s *GatewayStruct) GetActorEventsRaw(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) {\n\tif s.Internal.GetActorEventsRaw == nil {\n\t\treturn *new([]*types.ActorEvent), ErrNotSupported\n\t}\n\treturn s.Internal.GetActorEventsRaw(p0, p1)\n}\n```", + "name": "Filecoin.GetActorEvents", + "description": "```go\nfunc (s *GatewayStruct) GetActorEvents(p0 context.Context, p1 *types.ActorEventFilter) ([]*types.ActorEvent, error) {\n\tif s.Internal.GetActorEvents == nil {\n\t\treturn *new([]*types.ActorEvent), ErrNotSupported\n\t}\n\treturn s.Internal.GetActorEvents(p0, p1)\n}\n```", "summary": "There are not yet any comments for this method.", "paramStructure": "by-position", "params": [ @@ -5398,7 +5299,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4978" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4853" } }, { @@ -5592,7 +5493,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4989" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4864" } }, { @@ -5638,7 +5539,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5000" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4875" } }, { @@ -5788,7 +5689,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5011" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4886" } }, { @@ -5925,7 +5826,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5022" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4897" } }, { @@ -5993,7 +5894,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5033" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4908" } }, { @@ -6110,7 +6011,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5044" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4919" } }, { @@ -6201,7 +6102,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5055" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4930" } }, { @@ -6287,7 +6188,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5066" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4941" } }, { @@ -6314,7 +6215,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5077" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4952" } }, { @@ -6341,7 +6242,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5088" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4963" } }, { @@ -6409,7 +6310,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5099" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4974" } }, { @@ -6915,7 +6816,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5110" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4985" } }, { @@ -7012,7 +6913,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5121" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L4996" } }, { @@ -7112,7 +7013,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5132" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5007" } }, { @@ -7212,7 +7113,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5143" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5018" } }, { @@ -7337,7 +7238,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5154" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5029" } }, { @@ -7446,7 +7347,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5165" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5040" } }, { @@ -7549,7 +7450,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5176" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5051" } }, { @@ -7679,7 +7580,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5187" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5062" } }, { @@ -7786,7 +7687,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5198" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5073" } }, { @@ -7847,7 +7748,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5209" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5084" } }, { @@ -7915,7 +7816,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5220" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5095" } }, { @@ -7996,7 +7897,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5231" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5106" } }, { @@ -8155,100 +8056,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5242" - } - }, - { - "name": "Filecoin.StateMinerDeadlines", - "description": "```go\nfunc (s *GatewayStruct) StateMinerDeadlines(p0 context.Context, p1 address.Address, p2 types.TipSetKey) ([]Deadline, error) {\n\tif s.Internal.StateMinerDeadlines == nil {\n\t\treturn *new([]Deadline), ErrNotSupported\n\t}\n\treturn s.Internal.StateMinerDeadlines(p0, p1, p2)\n}\n```", - "summary": "There are not yet any comments for this method.", - "paramStructure": "by-position", - "params": [ - { - "name": "p1", - "description": "address.Address", - "summary": "", - "schema": { - "examples": [ - "f01234" - ], - "additionalProperties": false, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - }, - { - "name": "p2", - "description": "types.TipSetKey", - "summary": "", - "schema": { - "examples": [ - [ - { - "/": "bafy2bzacea3wsdh6y3a36tb3skempjoxqpuyompjbmfeyf34fi3uy6uue42v4" - }, - { - "/": "bafy2bzacebp3shtrn43k7g3unredz7fxn4gj533d3o43tqn2p2ipxxhrvchve" - } - ] - ], - "additionalProperties": false, - "type": [ - "object" - ] - }, - "required": true, - "deprecated": false - } - ], - "result": { - "name": "[]Deadline", - "description": "[]Deadline", - "summary": "", - "schema": { - "examples": [ - [ - { - "PostSubmissions": [ - 5, - 1 - ], - "DisputableProofCount": 42 - } - ] - ], - "items": [ - { - "additionalProperties": false, - "properties": { - "DisputableProofCount": { - "title": "number", - "type": "number" - }, - "PostSubmissions": { - "additionalProperties": false, - "type": "object" - } - }, - "type": [ - "object" - ] - } - ], - "type": [ - "array" - ] - }, - "required": true, - "deprecated": false - }, - "deprecated": false, - "externalDocs": { - "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5253" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5117" } }, { @@ -8449,7 +8257,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5264" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5128" } }, { @@ -8560,7 +8368,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5275" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5139" } }, { @@ -8691,7 +8499,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5286" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5150" } }, { @@ -8777,7 +8585,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5297" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5161" } }, { @@ -8804,7 +8612,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5308" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5172" } }, { @@ -8857,7 +8665,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5319" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5183" } }, { @@ -8945,7 +8753,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5330" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5194" } }, { @@ -9396,7 +9204,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5341" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5205" } }, { @@ -9563,7 +9371,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5352" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5216" } }, { @@ -9736,7 +9544,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5363" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5227" } }, { @@ -9804,7 +9612,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5374" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5238" } }, { @@ -9872,7 +9680,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5385" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5249" } }, { @@ -10033,7 +9841,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5396" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5260" } }, { @@ -10078,7 +9886,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5418" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5282" } }, { @@ -10123,7 +9931,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5429" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5293" } }, { @@ -10150,7 +9958,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5440" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5304" } } ] diff --git a/build/openrpc/miner.json b/build/openrpc/miner.json index cb614118807..0686987c87e 100644 --- a/build/openrpc/miner.json +++ b/build/openrpc/miner.json @@ -30,7 +30,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5726" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5700" } }, { @@ -109,7 +109,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5737" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5711" } }, { @@ -155,7 +155,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5748" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5722" } }, { @@ -203,7 +203,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5759" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5733" } }, { @@ -251,7 +251,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5770" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5744" } }, { @@ -354,7 +354,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5781" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5755" } }, { @@ -428,7 +428,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5792" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5766" } }, { @@ -591,7 +591,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5803" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5777" } }, { @@ -742,7 +742,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5814" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5788" } }, { @@ -781,7 +781,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5825" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5799" } }, { @@ -833,7 +833,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5836" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5810" } }, { @@ -872,7 +872,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5858" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5832" } }, { @@ -924,7 +924,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5869" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5843" } }, { @@ -996,7 +996,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5880" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5854" } }, { @@ -1035,7 +1035,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5891" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5865" } }, { @@ -1074,7 +1074,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5902" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5876" } }, { @@ -1101,7 +1101,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5913" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5887" } }, { @@ -1128,7 +1128,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5924" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5898" } }, { @@ -1155,7 +1155,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5935" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5909" } }, { @@ -1182,7 +1182,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5946" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5920" } }, { @@ -1209,7 +1209,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5957" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5931" } }, { @@ -1236,7 +1236,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5968" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5942" } }, { @@ -1294,7 +1294,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5979" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5953" } }, { @@ -1421,7 +1421,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5990" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5964" } }, { @@ -1461,7 +1461,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6001" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5975" } }, { @@ -1500,7 +1500,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6012" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5986" } }, { @@ -1539,7 +1539,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6023" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L5997" } }, { @@ -1578,7 +1578,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6034" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6008" } }, { @@ -1617,7 +1617,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6045" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6019" } }, { @@ -1656,7 +1656,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6056" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6030" } }, { @@ -1695,7 +1695,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6067" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6041" } }, { @@ -1747,7 +1747,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6078" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6052" } }, { @@ -1770,7 +1770,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6089" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6063" } }, { @@ -1813,7 +1813,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6100" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6074" } }, { @@ -1884,7 +1884,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6111" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6085" } }, { @@ -2265,7 +2265,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6122" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6096" } }, { @@ -2364,7 +2364,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6144" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6118" } }, { @@ -2415,7 +2415,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6166" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6140" } }, { @@ -2473,7 +2473,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6177" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6151" } }, { @@ -2616,7 +2616,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6188" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6162" } }, { @@ -2743,7 +2743,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6199" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6173" } }, { @@ -3007,7 +3007,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6210" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6184" } }, { @@ -3044,7 +3044,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6221" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6195" } }, { @@ -3182,7 +3182,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6232" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6206" } }, { @@ -3205,7 +3205,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6243" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6217" } }, { @@ -3276,7 +3276,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6254" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6228" } }, { @@ -3319,7 +3319,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6265" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6239" } }, { @@ -3426,7 +3426,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6276" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6250" } }, { @@ -3489,7 +3489,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6287" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6261" } }, { @@ -3521,7 +3521,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6298" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6272" } }, { @@ -3609,7 +3609,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6309" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6283" } }, { @@ -3700,7 +3700,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6320" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6294" } }, { @@ -3740,7 +3740,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6331" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6305" } }, { @@ -3780,7 +3780,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6342" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6316" } }, { @@ -3821,7 +3821,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6353" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6327" } }, { @@ -3889,7 +3889,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6364" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6338" } }, { @@ -4020,7 +4020,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6375" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6349" } }, { @@ -4151,7 +4151,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6386" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6360" } }, { @@ -4251,7 +4251,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6397" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6371" } }, { @@ -4351,7 +4351,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6408" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6382" } }, { @@ -4451,7 +4451,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6419" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6393" } }, { @@ -4551,7 +4551,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6430" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6404" } }, { @@ -4651,7 +4651,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6441" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6415" } }, { @@ -4751,7 +4751,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6452" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6426" } }, { @@ -4875,7 +4875,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6463" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6437" } }, { @@ -4999,7 +4999,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6474" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6448" } }, { @@ -5114,7 +5114,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6485" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6459" } }, { @@ -5214,7 +5214,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6496" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6470" } }, { @@ -5347,7 +5347,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6507" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6481" } }, { @@ -5471,7 +5471,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6518" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6492" } }, { @@ -5595,7 +5595,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6529" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6503" } }, { @@ -5719,7 +5719,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6540" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6514" } }, { @@ -5852,7 +5852,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6551" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6525" } }, { @@ -5952,7 +5952,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6562" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6536" } }, { @@ -5993,7 +5993,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6573" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6547" } }, { @@ -6065,7 +6065,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6584" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6558" } }, { @@ -6115,7 +6115,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6595" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6569" } }, { @@ -6159,7 +6159,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6606" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6580" } }, { @@ -6200,7 +6200,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6617" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6591" } }, { @@ -6444,7 +6444,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6628" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6602" } }, { @@ -6518,7 +6518,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6639" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6613" } }, { @@ -6568,7 +6568,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6650" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6624" } }, { @@ -6597,7 +6597,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6661" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6635" } }, { @@ -6626,7 +6626,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6672" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6646" } }, { @@ -6682,7 +6682,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6683" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6657" } }, { @@ -6705,7 +6705,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6694" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6668" } }, { @@ -6765,7 +6765,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6705" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6679" } }, { @@ -6804,7 +6804,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6716" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6690" } }, { @@ -6844,7 +6844,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6727" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6701" } }, { @@ -6917,7 +6917,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6738" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6712" } }, { @@ -6981,7 +6981,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6749" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6723" } }, { @@ -7044,7 +7044,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6760" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6734" } }, { @@ -7094,7 +7094,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6771" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6745" } }, { @@ -7653,7 +7653,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6782" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6756" } }, { @@ -7694,7 +7694,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6793" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6767" } }, { @@ -7735,7 +7735,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6804" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6778" } }, { @@ -7776,7 +7776,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6815" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6789" } }, { @@ -7817,7 +7817,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6826" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6800" } }, { @@ -7858,7 +7858,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6837" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6811" } }, { @@ -7889,7 +7889,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6848" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6822" } }, { @@ -7939,7 +7939,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6859" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6833" } }, { @@ -7980,7 +7980,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6870" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6844" } }, { @@ -8019,7 +8019,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6881" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6855" } }, { @@ -8083,7 +8083,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6892" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6866" } }, { @@ -8141,7 +8141,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6903" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6877" } }, { @@ -8588,7 +8588,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6914" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6888" } }, { @@ -8624,7 +8624,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6925" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6899" } }, { @@ -8767,7 +8767,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6936" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6910" } }, { @@ -8823,7 +8823,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6947" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6921" } }, { @@ -8862,7 +8862,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6958" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6932" } }, { @@ -9021,7 +9021,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6969" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6943" } }, { @@ -9073,7 +9073,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6980" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6954" } }, { @@ -9230,7 +9230,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6991" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6965" } }, { @@ -9330,7 +9330,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7002" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6976" } }, { @@ -9384,7 +9384,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7013" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6987" } }, { @@ -9423,7 +9423,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7024" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L6998" } }, { @@ -9508,7 +9508,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7035" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7009" } }, { @@ -9684,7 +9684,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7046" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7020" } }, { @@ -9711,7 +9711,6 @@ 0, 1, 0, - 0, 0 ], "Read": [ @@ -9719,7 +9718,6 @@ 3, 0, 0, - 0, 0 ] } @@ -9738,8 +9736,8 @@ "title": "number", "type": "number" }, - "maxItems": 6, - "minItems": 6, + "maxItems": 5, + "minItems": 5, "type": "array" }, "Sector": { @@ -9762,8 +9760,8 @@ "title": "number", "type": "number" }, - "maxItems": 6, - "minItems": 6, + "maxItems": 5, + "minItems": 5, "type": "array" } }, @@ -9782,7 +9780,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7057" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7031" } }, { @@ -9896,7 +9894,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7068" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7042" } }, { @@ -9950,7 +9948,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7079" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7053" } }, { @@ -9984,7 +9982,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7090" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7064" } }, { @@ -10071,7 +10069,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7101" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7075" } }, { @@ -10125,7 +10123,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7112" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7086" } }, { @@ -10225,7 +10223,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7123" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7097" } }, { @@ -10302,7 +10300,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7134" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7108" } }, { @@ -10393,7 +10391,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7145" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7119" } }, { @@ -10432,7 +10430,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7156" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7130" } }, { @@ -10548,7 +10546,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7167" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7141" } }, { @@ -12648,7 +12646,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7178" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7152" } } ] diff --git a/build/openrpc/worker.json b/build/openrpc/worker.json index 0afaa17aebd..2cea4e87775 100644 --- a/build/openrpc/worker.json +++ b/build/openrpc/worker.json @@ -161,7 +161,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7266" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7240" } }, { @@ -252,7 +252,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7277" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7251" } }, { @@ -420,7 +420,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7288" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7262" } }, { @@ -447,7 +447,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7299" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7273" } }, { @@ -597,7 +597,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7310" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7284" } }, { @@ -700,7 +700,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7321" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7295" } }, { @@ -803,7 +803,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7332" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7306" } }, { @@ -925,7 +925,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7343" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7317" } }, { @@ -1135,7 +1135,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7354" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7328" } }, { @@ -1306,7 +1306,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7365" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7339" } }, { @@ -3350,7 +3350,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7376" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7350" } }, { @@ -3470,7 +3470,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7387" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7361" } }, { @@ -3531,7 +3531,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7398" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7372" } }, { @@ -3569,7 +3569,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7409" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7383" } }, { @@ -3729,7 +3729,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7420" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7394" } }, { @@ -3913,7 +3913,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7431" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7405" } }, { @@ -4054,7 +4054,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7442" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7416" } }, { @@ -4107,7 +4107,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7453" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7427" } }, { @@ -4250,7 +4250,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7464" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7438" } }, { @@ -4474,7 +4474,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7475" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7449" } }, { @@ -4601,7 +4601,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7486" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7460" } }, { @@ -4768,7 +4768,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7497" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7471" } }, { @@ -4895,7 +4895,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7508" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7482" } }, { @@ -4933,7 +4933,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7519" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7493" } }, { @@ -4972,7 +4972,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7530" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7504" } }, { @@ -4995,7 +4995,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7541" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7515" } }, { @@ -5034,7 +5034,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7552" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7526" } }, { @@ -5057,7 +5057,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7563" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7537" } }, { @@ -5096,7 +5096,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7574" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7548" } }, { @@ -5130,7 +5130,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7585" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7559" } }, { @@ -5184,7 +5184,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7596" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7570" } }, { @@ -5223,7 +5223,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7607" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7581" } }, { @@ -5262,7 +5262,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7618" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7592" } }, { @@ -5297,7 +5297,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7629" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7603" } }, { @@ -5477,7 +5477,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7640" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7614" } }, { @@ -5506,7 +5506,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7651" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7625" } }, { @@ -5529,7 +5529,7 @@ "deprecated": false, "externalDocs": { "description": "Github remote link", - "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7662" + "url": "https://github.com/filecoin-project/lotus/blob/master/api/proxy_gen.go#L7636" } } ] diff --git a/chain/events/filter/index.go b/chain/events/filter/index.go index 83998767e1e..49be57c7964 100644 --- a/chain/events/filter/index.go +++ b/chain/events/filter/index.go @@ -45,8 +45,8 @@ var ddls = []string{ reverted INTEGER NOT NULL )`, - createIndexEventHeightTipsetKey, - createIndexEventEmitterAddr, + `CREATE INDEX IF NOT EXISTS height_tipset_key ON event (height,tipset_key)`, + `CREATE INDEX IF NOT EXISTS event_emitter_addr ON event (emitter_addr)`, `CREATE TABLE IF NOT EXISTS event_entry ( event_id INTEGER, @@ -57,11 +57,11 @@ var ddls = []string{ value BLOB NOT NULL )`, - createIndexEventEntryKey, + `CREATE INDEX IF NOT EXISTS event_entry_key_index ON event_entry (key)`, // metadata containing version of schema `CREATE TABLE IF NOT EXISTS _meta ( - version UINT64 NOT NULL UNIQUE + version UINT64 NOT NULL UNIQUE )`, `INSERT OR IGNORE INTO _meta (version) VALUES (1)`, @@ -81,10 +81,6 @@ const ( insertEntry = `INSERT OR IGNORE INTO event_entry(event_id, indexed, flags, key, codec, value) VALUES(?, ?, ?, ?, ?, ?)` revertEventsInTipset = `UPDATE event SET reverted=true WHERE height=? AND tipset_key=?` restoreEvent = `UPDATE event SET reverted=false WHERE height=? AND tipset_key=? AND tipset_key_cid=? AND emitter_addr=? AND event_index=? AND message_cid=? AND message_index=?` - - createIndexEventHeightTipsetKey = `CREATE INDEX IF NOT EXISTS height_tipset_key ON event (height,tipset_key)` - createIndexEventEmitterAddr = `CREATE INDEX IF NOT EXISTS event_emitter_addr ON event (emitter_addr)` - createIndexEventEntryKey = `CREATE INDEX IF NOT EXISTS event_entry_key_index ON event_entry (key)` ) type EventIndex struct { @@ -129,43 +125,43 @@ func (ei *EventIndex) initStatements() (err error) { func (ei *EventIndex) migrateToVersion2(ctx context.Context, chainStore *store.ChainStore) error { now := time.Now() - tx, err := ei.db.BeginTx(ctx, nil) + tx, err := ei.db.Begin() if err != nil { return xerrors.Errorf("begin transaction: %w", err) } // rollback the transaction (a no-op if the transaction was already committed) - defer func() { _ = tx.Rollback() }() + defer tx.Rollback() //nolint:errcheck // create some temporary indices to help speed up the migration - _, err = tx.ExecContext(ctx, "CREATE INDEX IF NOT EXISTS tmp_height_tipset_key_cid ON event (height,tipset_key_cid)") + _, err = tx.Exec("CREATE INDEX IF NOT EXISTS tmp_height_tipset_key_cid ON event (height,tipset_key_cid)") if err != nil { return xerrors.Errorf("create index tmp_height_tipset_key_cid: %w", err) } - _, err = tx.ExecContext(ctx, "CREATE INDEX IF NOT EXISTS tmp_tipset_key_cid ON event (tipset_key_cid)") + _, err = tx.Exec("CREATE INDEX IF NOT EXISTS tmp_tipset_key_cid ON event (tipset_key_cid)") if err != nil { return xerrors.Errorf("create index tmp_tipset_key_cid: %w", err) } - stmtDeleteOffChainEvent, err := tx.PrepareContext(ctx, "DELETE FROM event WHERE tipset_key_cid!=? and height=?") + stmtDeleteOffChainEvent, err := tx.Prepare("DELETE FROM event WHERE tipset_key_cid!=? and height=?") if err != nil { return xerrors.Errorf("prepare stmtDeleteOffChainEvent: %w", err) } - stmtSelectEvent, err := tx.PrepareContext(ctx, "SELECT id FROM event WHERE tipset_key_cid=? ORDER BY message_index ASC, event_index ASC, id DESC LIMIT 1") + stmtSelectEvent, err := tx.Prepare("SELECT id FROM event WHERE tipset_key_cid=? ORDER BY message_index ASC, event_index ASC, id DESC LIMIT 1") if err != nil { return xerrors.Errorf("prepare stmtSelectEvent: %w", err) } - stmtDeleteEvent, err := tx.PrepareContext(ctx, "DELETE FROM event WHERE tipset_key_cid=? AND id 0 { - subclauses := make([]string, 0, len(f.addresses)) + subclauses := []string{} for _, addr := range f.addresses { subclauses = append(subclauses, "emitter_addr=?") values = append(values, addr.Bytes()) @@ -580,7 +543,7 @@ func (ei *EventIndex) prefillFilter(ctx context.Context, f *eventFilter, exclude joins = append(joins, fmt.Sprintf("event_entry %s on event.id=%[1]s.event_id", joinAlias)) clauses = append(clauses, fmt.Sprintf("%s.indexed=1 AND %[1]s.key=?", joinAlias)) values = append(values, key) - subclauses := make([]string, 0, len(vals)) + subclauses := []string{} for _, val := range vals { subclauses = append(subclauses, fmt.Sprintf("(%s.value=? AND %[1]s.codec=?)", joinAlias)) values = append(values, val.Value, val.Codec) diff --git a/chain/events/state/predicates.go b/chain/events/state/predicates.go index 298f787ff93..e4e8b8f7e41 100644 --- a/chain/events/state/predicates.go +++ b/chain/events/state/predicates.go @@ -369,7 +369,7 @@ func (sp *StatePredicates) OnMinerPreCommitChange() DiffMinerActorStateFunc { // DiffPaymentChannelStateFunc is function that compares two states for the payment channel type DiffPaymentChannelStateFunc func(ctx context.Context, oldState paych.State, newState paych.State) (changed bool, user UserData, err error) -// OnPaymentChannelActorChanged calls diffPaymentChannelState when the state changes for the payment channel actor +// OnPaymentChannelActorChanged calls diffPaymentChannelState when the state changes for the the payment channel actor func (sp *StatePredicates) OnPaymentChannelActorChanged(paychAddr address.Address, diffPaymentChannelState DiffPaymentChannelStateFunc) DiffTipSetKeyFunc { return sp.OnActorStateChanged(paychAddr, func(ctx context.Context, oldActorState, newActorState *types.Actor) (changed bool, user UserData, err error) { oldState, err := paych.Load(adt.WrapStore(ctx, sp.cst), oldActorState) diff --git a/chain/messagepool/selection_test.go b/chain/messagepool/selection_test.go index 48846bb7e5b..17e0f34f4e0 100644 --- a/chain/messagepool/selection_test.go +++ b/chain/messagepool/selection_test.go @@ -1191,7 +1191,7 @@ func TestOptimalMessageSelection2(t *testing.T) { func TestOptimalMessageSelection3(t *testing.T) { //stm: @TOKEN_WALLET_NEW_001, @CHAIN_MEMPOOL_SELECT_001 - // this test uses 10 actors sending a block of messages to each other, with the first + // this test uses 10 actors sending a block of messages to each other, with the the first // actors paying higher gas premium than the subsequent actors. // We select with a low ticket quality; the chain dependent merging algorithm should pick // messages from the median actor from the start diff --git a/chain/stmgr/forks.go b/chain/stmgr/forks.go index 9a236196187..6d6f9ef65f3 100644 --- a/chain/stmgr/forks.go +++ b/chain/stmgr/forks.go @@ -182,15 +182,7 @@ func (sm *StateManager) HandleStateForks(ctx context.Context, root cid.Cid, heig if err == nil { if ok { log.Infow("CACHED migration", "height", height, "from", root, "to", migCid) - foundMigratedRoot, err := sm.ChainStore().StateBlockstore().Has(ctx, migCid) - if err != nil { - log.Errorw("failed to check whether previous migration result is present", "err", err) - } else if !foundMigratedRoot { - log.Errorw("cached migration result not found in blockstore, running migration again") - u.migrationResultCache.Delete(ctx, root) - } else { - return migCid, nil - } + return migCid, nil } } else if !errors.Is(err, datastore.ErrNotFound) { log.Errorw("failed to lookup previous migration result", "err", err) diff --git a/chain/stmgr/stmgr.go b/chain/stmgr/stmgr.go index cd35d6d193e..49913e442d1 100644 --- a/chain/stmgr/stmgr.go +++ b/chain/stmgr/stmgr.go @@ -113,10 +113,6 @@ func (m *migrationResultCache) Store(ctx context.Context, root cid.Cid, resultCi return nil } -func (m *migrationResultCache) Delete(ctx context.Context, root cid.Cid) { - _ = m.ds.Delete(ctx, m.keyForMigration(root)) -} - type Executor interface { NewActorRegistry() *vm.ActorRegistry ExecuteTipSet(ctx context.Context, sm *StateManager, ts *types.TipSet, em ExecMonitor, vmTracing bool) (stateroot cid.Cid, rectsroot cid.Cid, err error) diff --git a/chain/sync_manager.go b/chain/sync_manager.go index 2f54ac8bb7e..3369c3b5a0d 100644 --- a/chain/sync_manager.go +++ b/chain/sync_manager.go @@ -357,7 +357,7 @@ func (sm *syncManager) selectInitialSyncTarget() (*types.TipSet, error) { return buckets.Heaviest(), nil } -// adds a tipset to the potential sync targets; returns true if there is a tipset to work on. +// adds a tipset to the potential sync targets; returns true if there is a a tipset to work on. // this could be either a restart, eg because there is no currently scheduled sync work or a worker // failed or a potential fork. func (sm *syncManager) addSyncTarget(ts *types.TipSet) (*types.TipSet, bool, error) { diff --git a/cli/filplus.go b/cli/filplus.go index fbb922a24a2..a4982cecbec 100644 --- a/cli/filplus.go +++ b/cli/filplus.go @@ -4,30 +4,23 @@ import ( "bytes" "context" "encoding/hex" - "errors" "fmt" "os" "strconv" "strings" cbor "github.com/ipfs/go-ipld-cbor" - "github.com/manifoldco/promptui" "github.com/urfave/cli/v2" - "golang.org/x/sync/errgroup" "golang.org/x/xerrors" "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" - "github.com/filecoin-project/go-state-types/builtin" - verifregtypes13 "github.com/filecoin-project/go-state-types/builtin/v13/verifreg" verifregtypes8 "github.com/filecoin-project/go-state-types/builtin/v8/verifreg" - datacap2 "github.com/filecoin-project/go-state-types/builtin/v9/datacap" verifregtypes9 "github.com/filecoin-project/go-state-types/builtin/v9/verifreg" "github.com/filecoin-project/go-state-types/network" - "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/v0api" "github.com/filecoin-project/lotus/blockstore" "github.com/filecoin-project/lotus/build" @@ -54,7 +47,6 @@ var filplusCmd = &cli.Command{ filplusListClaimsCmd, filplusRemoveExpiredAllocationsCmd, filplusRemoveExpiredClaimsCmd, - filplusExtendClaimCmd, }, } @@ -931,430 +923,3 @@ var filplusSignRemoveDataCapProposal = &cli.Command{ return nil }, } - -var filplusExtendClaimCmd = &cli.Command{ - Name: "extend-claim", - Usage: "extend claim expiration (TermMax)", - Flags: []cli.Flag{ - &cli.Int64Flag{ - Name: "term-max", - Usage: "The maximum period for which a provider can earn quality-adjusted power for the piece (epochs). Default is 5 years.", - Aliases: []string{"tmax"}, - Value: verifregtypes13.MaximumVerifiedAllocationTerm, - }, - &cli.StringFlag{ - Name: "client", - Usage: "the client address that will used to send the message", - Required: true, - }, - &cli.BoolFlag{ - Name: "all", - Usage: "automatically extend TermMax of all claims for specified miner[s] to --term-max (default: 5 years from claim start epoch)", - }, - &cli.StringSliceFlag{ - Name: "miner", - Usage: "storage provider address[es]", - Aliases: []string{"m", "provider", "p"}, - }, - &cli.BoolFlag{ - Name: "assume-yes", - Usage: "automatic yes to prompts; assume 'yes' as answer to all prompts and run non-interactively", - Aliases: []string{"y", "yes"}, - }, - &cli.IntFlag{ - Name: "confidence", - Usage: "number of block confirmations to wait for", - Value: int(build.MessageConfidence), - }, - }, - ArgsUsage: " ... or ...", - Action: func(cctx *cli.Context) error { - - miners := cctx.StringSlice("miner") - all := cctx.Bool("all") - client := cctx.String("client") - tmax := cctx.Int64("term-max") - - // No miner IDs and no arguments - if len(miners) == 0 && cctx.Args().Len() == 0 { - return xerrors.Errorf("must specify at least one miner ID or argument[s]") - } - - // Single Miner with no claimID and no --all flag - if len(miners) == 1 && cctx.Args().Len() == 0 && !all { - return xerrors.Errorf("must specify either --all flag or claim IDs to extend in argument") - } - - // Multiple Miner with claimIDs - if len(miners) > 1 && cctx.Args().Len() > 0 { - return xerrors.Errorf("either specify multiple miner IDs or multiple arguments") - } - - // Multiple Miner with no claimID and no --all flag - if len(miners) > 1 && cctx.Args().Len() == 0 && !all { - return xerrors.Errorf("must specify --all flag with multiple miner IDs") - } - - // Tmax can't be more than policy max - if tmax > verifregtypes13.MaximumVerifiedAllocationTerm { - return xerrors.Errorf("specified term-max %d is larger than %d maximum allowed by verified regirty actor policy", tmax, verifregtypes13.MaximumVerifiedAllocationTerm) - } - - api, closer, err := GetFullNodeAPIV1(cctx) - if err != nil { - return xerrors.Errorf("failed to get full node api: %s", err) - } - defer closer() - ctx := ReqContext(cctx) - - clientAddr, err := address.NewFromString(client) - if err != nil { - return err - } - - claimMap := make(map[verifregtypes13.ClaimId]ProvInfo) - - // If no miners and arguments are present - if len(miners) == 0 && cctx.Args().Len() > 0 { - for _, arg := range cctx.Args().Slice() { - detail := strings.Split(arg, "=") - if len(detail) > 2 { - return xerrors.Errorf("incorrect argument format: %s", detail) - } - - n, err := strconv.ParseInt(detail[1], 10, 64) - if err != nil { - return xerrors.Errorf("failed to parse the claim ID for %s for argument %s: %s", detail[0], detail, err) - } - - maddr, err := address.NewFromString(detail[0]) - if err != nil { - return err - } - - // Verify that minerID exists - _, err = api.StateMinerInfo(ctx, maddr, types.EmptyTSK) - if err != nil { - return err - } - - mid, err := address.IDFromAddress(maddr) - if err != nil { - return err - } - - pi := ProvInfo{ - Addr: maddr, - ID: abi.ActorID(mid), - } - - claimMap[verifregtypes13.ClaimId(n)] = pi - } - } - - // If 1 miner ID and multiple arguments - if len(miners) == 1 && cctx.Args().Len() > 0 && !all { - for _, arg := range cctx.Args().Slice() { - detail := strings.Split(arg, "=") - if len(detail) > 1 { - return xerrors.Errorf("incorrect argument format %s. Must provide only claim IDs with single miner ID", detail) - } - - n, err := strconv.ParseInt(detail[0], 10, 64) - if err != nil { - return xerrors.Errorf("failed to parse the claim ID for %s for argument %s: %s", detail[0], detail, err) - } - - claimMap[verifregtypes13.ClaimId(n)] = ProvInfo{} - } - } - - msgs, err := CreateExtendClaimMsg(ctx, api, claimMap, miners, clientAddr, abi.ChainEpoch(tmax), all, cctx.Bool("assume-yes")) - if err != nil { - return err - } - - // If not msgs are found then no claims can be extended - if msgs == nil { - fmt.Println("No eligible claims to extend") - return nil - } - - // MpoolBatchPushMessage method will take care of gas estimation and funds check - smsgs, err := api.MpoolBatchPushMessage(ctx, msgs, nil) - if err != nil { - return err - } - - // wait for msgs to get mined into a block - eg := errgroup.Group{} - eg.SetLimit(10) - for _, msg := range smsgs { - msg := msg - eg.Go(func() error { - wait, err := api.StateWaitMsg(ctx, msg.Cid(), uint64(cctx.Int("confidence")), 2000, true) - if err != nil { - return xerrors.Errorf("timeout waiting for message to land on chain %s", wait.Message) - - } - - if wait.Receipt.ExitCode.IsError() { - return xerrors.Errorf("failed to execute message %s: %s", wait.Message, wait.Receipt.ExitCode) - } - return nil - }) - } - return eg.Wait() - }, -} - -type ProvInfo struct { - Addr address.Address - ID abi.ActorID -} - -// CreateExtendClaimMsg creates extend message[s] based on the following conditions -// 1. Extend all claims for a miner ID -// 2. Extend all claims for multiple miner IDs -// 3. Extend specified claims for a miner ID -// 4. Extend specific claims for specific miner ID -// 5. Extend all claims for a miner ID with different client address (2 messages) -// 6. Extend all claims for multiple miner IDs with different client address (2 messages) -// 7. Extend specified claims for a miner ID with different client address (2 messages) -// 8. Extend specific claims for specific miner ID with different client address (2 messages) -func CreateExtendClaimMsg(ctx context.Context, api api.FullNode, pcm map[verifregtypes13.ClaimId]ProvInfo, miners []string, wallet address.Address, tmax abi.ChainEpoch, all, assumeYes bool) ([]*types.Message, error) { - - ac, err := api.StateLookupID(ctx, wallet, types.EmptyTSK) - if err != nil { - return nil, err - } - w, err := address.IDFromAddress(ac) - if err != nil { - return nil, xerrors.Errorf("converting wallet address to ID: %w", err) - } - - wid := abi.ActorID(w) - - head, err := api.ChainHead(ctx) - if err != nil { - return nil, err - } - - var terms []verifregtypes13.ClaimTerm - var newClaims []verifregtypes13.ClaimExtensionRequest - rDataCap := big.NewInt(0) - - // If --all is set - if all { - for _, id := range miners { - maddr, err := address.NewFromString(id) - if err != nil { - return nil, xerrors.Errorf("parsing miner %s: %s", id, err) - } - mid, err := address.IDFromAddress(maddr) - if err != nil { - return nil, xerrors.Errorf("converting miner address to miner ID: %s", err) - } - claims, err := api.StateGetClaims(ctx, maddr, types.EmptyTSK) - if err != nil { - return nil, xerrors.Errorf("getting claims for miner %s: %s", maddr, err) - } - for claimID, claim := range claims { - claimID := claimID - claim := claim - if claim.TermMax < tmax && claim.TermStart+claim.TermMax > head.Height() { - // If client is not same - needs to burn datacap - if claim.Client != wid { - newClaims = append(newClaims, verifregtypes13.ClaimExtensionRequest{ - Claim: verifregtypes13.ClaimId(claimID), - Provider: abi.ActorID(mid), - TermMax: tmax, - }) - rDataCap.Add(big.NewInt(int64(claim.Size)).Int, rDataCap.Int) - continue - } - terms = append(terms, verifregtypes13.ClaimTerm{ - ClaimId: verifregtypes13.ClaimId(claimID), - TermMax: tmax, - Provider: abi.ActorID(mid), - }) - } - } - } - } - - // Single miner and specific claims - if len(miners) == 1 && len(pcm) > 0 { - maddr, err := address.NewFromString(miners[0]) - if err != nil { - return nil, xerrors.Errorf("parsing miner %s: %s", miners[0], err) - } - mid, err := address.IDFromAddress(maddr) - if err != nil { - return nil, xerrors.Errorf("converting miner address to miner ID: %s", err) - } - claims, err := api.StateGetClaims(ctx, maddr, types.EmptyTSK) - if err != nil { - return nil, xerrors.Errorf("getting claims for miner %s: %s", maddr, err) - } - - for claimID := range pcm { - claimID := claimID - claim, ok := claims[verifregtypes9.ClaimId(claimID)] - if !ok { - return nil, xerrors.Errorf("claim %d not found for provider %s", claimID, miners[0]) - } - if claim.TermMax < tmax && claim.TermStart+claim.TermMax > head.Height() { - // If client is not same - needs to burn datacap - if claim.Client != wid { - newClaims = append(newClaims, verifregtypes13.ClaimExtensionRequest{ - Claim: claimID, - Provider: abi.ActorID(mid), - TermMax: tmax, - }) - rDataCap.Add(big.NewInt(int64(claim.Size)).Int, rDataCap.Int) - continue - } - terms = append(terms, verifregtypes13.ClaimTerm{ - ClaimId: claimID, - TermMax: tmax, - Provider: abi.ActorID(mid), - }) - } - } - } - - if len(miners) == 0 && len(pcm) > 0 { - for claimID, prov := range pcm { - prov := prov - claimID := claimID - claim, err := api.StateGetClaim(ctx, prov.Addr, verifregtypes9.ClaimId(claimID), types.EmptyTSK) - if err != nil { - return nil, xerrors.Errorf("could not load the claim %d: %s", claimID, err) - } - if claim == nil { - return nil, xerrors.Errorf("claim %d not found in the actor state", claimID) - } - if claim.TermMax < tmax && claim.TermStart+claim.TermMax > head.Height() { - // If client is not same - needs to burn datacap - if claim.Client != wid { - newClaims = append(newClaims, verifregtypes13.ClaimExtensionRequest{ - Claim: claimID, - Provider: prov.ID, - TermMax: tmax, - }) - rDataCap.Add(big.NewInt(int64(claim.Size)).Int, rDataCap.Int) - continue - } - terms = append(terms, verifregtypes13.ClaimTerm{ - ClaimId: claimID, - TermMax: tmax, - Provider: prov.ID, - }) - } - } - } - - var msgs []*types.Message - - if len(terms) > 0 { - params, err := actors.SerializeParams(&verifregtypes13.ExtendClaimTermsParams{ - Terms: terms, - }) - - if err != nil { - return nil, xerrors.Errorf("failed to searialise the parameters: %s", err) - } - - oclaimMsg := &types.Message{ - To: verifreg.Address, - From: wallet, - Method: verifreg.Methods.ExtendClaimTerms, - Params: params, - } - - msgs = append(msgs, oclaimMsg) - } - - if len(newClaims) > 0 { - // Get datacap balance - aDataCap, err := api.StateVerifiedClientStatus(ctx, wallet, types.EmptyTSK) - if err != nil { - return nil, err - } - - if aDataCap == nil { - return nil, xerrors.Errorf("wallet %s does not have any datacap", wallet) - } - - // Check that we have enough data cap to make the allocation - if rDataCap.GreaterThan(big.NewInt(aDataCap.Int64())) { - return nil, xerrors.Errorf("requested datacap %s is greater then the available datacap %s", rDataCap, aDataCap) - } - - ncparams, err := actors.SerializeParams(&verifregtypes13.AllocationRequests{ - Extensions: newClaims, - }) - - if err != nil { - return nil, xerrors.Errorf("failed to searialise the parameters: %s", err) - } - - transferParams, err := actors.SerializeParams(&datacap2.TransferParams{ - To: builtin.VerifiedRegistryActorAddr, - Amount: big.Mul(rDataCap, builtin.TokenPrecision), - OperatorData: ncparams, - }) - - if err != nil { - return nil, xerrors.Errorf("failed to serialize transfer parameters: %s", err) - } - - nclaimMsg := &types.Message{ - To: builtin.DatacapActorAddr, - From: wallet, - Method: datacap.Methods.TransferExported, - Params: transferParams, - Value: big.Zero(), - } - - if !assumeYes { - out := fmt.Sprintf("Some of the specified allocation have a different client address and will require %d Datacap to extend. Proceed? Yes [Y/y] / No [N/n], Ctrl+C (^C) to exit", rDataCap.Int) - validate := func(input string) error { - if strings.EqualFold(input, "y") || strings.EqualFold(input, "yes") { - return nil - } - if strings.EqualFold(input, "n") || strings.EqualFold(input, "no") { - return nil - } - return errors.New("incorrect input") - } - - templates := &promptui.PromptTemplates{ - Prompt: "{{ . }} ", - Valid: "{{ . | green }} ", - Invalid: "{{ . | red }} ", - Success: "{{ . | cyan | bold }} ", - } - - prompt := promptui.Prompt{ - Label: out, - Templates: templates, - Validate: validate, - } - - input, err := prompt.Run() - if err != nil { - return nil, err - } - if strings.Contains(strings.ToLower(input), "n") { - fmt.Println("Dropping the extension for claims that require Datacap") - return msgs, nil - } - } - - msgs = append(msgs, nclaimMsg) - } - - return msgs, nil -} diff --git a/cli/util/api.go b/cli/util/api.go index 7940f67c63a..fe1ac153678 100644 --- a/cli/util/api.go +++ b/cli/util/api.go @@ -76,52 +76,50 @@ func GetAPIInfoMulti(ctx *cli.Context, t repo.RepoType) ([]APIInfo, error) { if path == "" { continue } - return GetAPIInfoFromRepoPath(path, t) - } - for _, env := range fallbacksEnvs { - env, ok := os.LookupEnv(env) - if ok { - return ParseApiInfoMulti(env), nil + + p, err := homedir.Expand(path) + if err != nil { + return []APIInfo{}, xerrors.Errorf("could not expand home dir (%s): %w", f, err) } - } - return []APIInfo{}, fmt.Errorf("could not determine API endpoint for node type: %v. Try setting environment variable: %s", t.Type(), primaryEnv) -} + r, err := repo.NewFS(p) + if err != nil { + return []APIInfo{}, xerrors.Errorf("could not open repo at path: %s; %w", p, err) + } -func GetAPIInfoFromRepoPath(path string, t repo.RepoType) ([]APIInfo, error) { - p, err := homedir.Expand(path) - if err != nil { - return []APIInfo{}, xerrors.Errorf("could not expand home dir (%s): %w", path, err) - } + exists, err := r.Exists() + if err != nil { + return []APIInfo{}, xerrors.Errorf("repo.Exists returned an error: %w", err) + } - r, err := repo.NewFS(p) - if err != nil { - return []APIInfo{}, xerrors.Errorf("could not open repo at path: %s; %w", p, err) - } + if !exists { + return []APIInfo{}, errors.New("repo directory does not exist. Make sure your configuration is correct") + } - exists, err := r.Exists() - if err != nil { - return []APIInfo{}, xerrors.Errorf("repo.Exists returned an error: %w", err) - } + ma, err := r.APIEndpoint() + if err != nil { + return []APIInfo{}, xerrors.Errorf("could not get api endpoint: %w", err) + } - if !exists { - return []APIInfo{}, errors.New("repo directory does not exist. Make sure your configuration is correct") - } + token, err := r.APIToken() + if err != nil { + log.Warnf("Couldn't load CLI token, capabilities may be limited: %v", err) + } - ma, err := r.APIEndpoint() - if err != nil { - return []APIInfo{}, xerrors.Errorf("could not get api endpoint: %w", err) + return []APIInfo{{ + Addr: ma.String(), + Token: token, + }}, nil } - token, err := r.APIToken() - if err != nil { - log.Warnf("Couldn't load CLI token, capabilities may be limited: %v", err) + for _, env := range fallbacksEnvs { + env, ok := os.LookupEnv(env) + if ok { + return ParseApiInfoMulti(env), nil + } } - return []APIInfo{{ - Addr: ma.String(), - Token: token, - }}, nil + return []APIInfo{}, fmt.Errorf("could not determine API endpoint for node type: %v. Try setting environment variable: %s", t.Type(), primaryEnv) } func GetAPIInfo(ctx *cli.Context, t repo.RepoType) (APIInfo, error) { @@ -166,6 +164,28 @@ func GetRawAPIMulti(ctx *cli.Context, t repo.RepoType, version string) ([]HttpHe return httpHeads, nil } +func GetRawAPIMultiV2(ctx *cli.Context, ainfoCfg []string, version string) ([]HttpHead, error) { + var httpHeads []HttpHead + + if len(ainfoCfg) == 0 { + return httpHeads, xerrors.Errorf("could not get API info: none configured. \nConsider getting base.toml with './lotus-provider config get base >/tmp/base.toml' \nthen adding \n[APIs] \n ChainApiInfo = [\" result_from lotus auth api-info --perm=admin \"]\n and updating it with './lotus-provider config set /tmp/base.toml'") + } + for _, i := range ainfoCfg { + ainfo := ParseApiInfo(i) + addr, err := ainfo.DialArgs(version) + if err != nil { + return httpHeads, xerrors.Errorf("could not get DialArgs: %w", err) + } + httpHeads = append(httpHeads, HttpHead{addr: addr, header: ainfo.AuthHeader()}) + } + + if IsVeryVerbose { + _, _ = fmt.Fprintf(ctx.App.Writer, "using raw API %s endpoint: %s\n", version, httpHeads[0].addr) + } + + return httpHeads, nil +} + func GetRawAPI(ctx *cli.Context, t repo.RepoType, version string) (string, http.Header, error) { heads, err := GetRawAPIMulti(ctx, t, version) if err != nil { @@ -322,14 +342,14 @@ func GetFullNodeAPIV1Single(ctx *cli.Context) (v1api.FullNode, jsonrpc.ClientClo } type GetFullNodeOptions struct { - EthSubHandler api.EthSubscriber + ethSubHandler api.EthSubscriber } type GetFullNodeOption func(*GetFullNodeOptions) func FullNodeWithEthSubscribtionHandler(sh api.EthSubscriber) GetFullNodeOption { return func(opts *GetFullNodeOptions) { - opts.EthSubHandler = sh + opts.ethSubHandler = sh } } @@ -344,8 +364,8 @@ func GetFullNodeAPIV1(ctx *cli.Context, opts ...GetFullNodeOption) (v1api.FullNo } var rpcOpts []jsonrpc.Option - if options.EthSubHandler != nil { - rpcOpts = append(rpcOpts, jsonrpc.WithClientHandler("Filecoin", options.EthSubHandler), jsonrpc.WithClientHandlerAlias("eth_subscription", "Filecoin.EthSubscription")) + if options.ethSubHandler != nil { + rpcOpts = append(rpcOpts, jsonrpc.WithClientHandler("Filecoin", options.ethSubHandler), jsonrpc.WithClientHandlerAlias("eth_subscription", "Filecoin.EthSubscription")) } heads, err := GetRawAPIMulti(ctx, repo.FullNode, "v1") @@ -395,6 +415,68 @@ func GetFullNodeAPIV1(ctx *cli.Context, opts ...GetFullNodeOption) (v1api.FullNo return &v1API, finalCloser, nil } +func GetFullNodeAPIV1LotusProvider(ctx *cli.Context, ainfoCfg []string, opts ...GetFullNodeOption) (v1api.FullNode, jsonrpc.ClientCloser, error) { + if tn, ok := ctx.App.Metadata["testnode-full"]; ok { + return tn.(v1api.FullNode), func() {}, nil + } + + var options GetFullNodeOptions + for _, opt := range opts { + opt(&options) + } + + var rpcOpts []jsonrpc.Option + if options.ethSubHandler != nil { + rpcOpts = append(rpcOpts, jsonrpc.WithClientHandler("Filecoin", options.ethSubHandler), jsonrpc.WithClientHandlerAlias("eth_subscription", "Filecoin.EthSubscription")) + } + + heads, err := GetRawAPIMultiV2(ctx, ainfoCfg, "v1") + if err != nil { + return nil, nil, err + } + + if IsVeryVerbose { + _, _ = fmt.Fprintln(ctx.App.Writer, "using full node API v1 endpoint:", heads[0].addr) + } + + var fullNodes []api.FullNode + var closers []jsonrpc.ClientCloser + + for _, head := range heads { + v1api, closer, err := client.NewFullNodeRPCV1(ctx.Context, head.addr, head.header, rpcOpts...) + if err != nil { + log.Warnf("Not able to establish connection to node with addr: %s, Reason: %s", head.addr, err.Error()) + continue + } + fullNodes = append(fullNodes, v1api) + closers = append(closers, closer) + } + + // When running in cluster mode and trying to establish connections to multiple nodes, fail + // if less than 2 lotus nodes are actually running + if len(heads) > 1 && len(fullNodes) < 2 { + return nil, nil, xerrors.Errorf("Not able to establish connection to more than a single node") + } + + finalCloser := func() { + for _, c := range closers { + c() + } + } + + var v1API api.FullNodeStruct + FullNodeProxy(fullNodes, &v1API) + + v, err := v1API.Version(ctx.Context) + if err != nil { + return nil, nil, err + } + if !v.APIVersion.EqMajorMinor(api.FullAPIVersion1) { + return nil, nil, xerrors.Errorf("Remote API version didn't match (expected %s, remote %s)", api.FullAPIVersion1, v.APIVersion) + } + return &v1API, finalCloser, nil +} + type GetStorageMinerOptions struct { PreferHttp bool } diff --git a/cmd/curio/deps/apiinfo.go b/cmd/curio/deps/apiinfo.go deleted file mode 100644 index 0dd96d81735..00000000000 --- a/cmd/curio/deps/apiinfo.go +++ /dev/null @@ -1,94 +0,0 @@ -package deps - -import ( - "fmt" - "net/http" - - "github.com/urfave/cli/v2" - "golang.org/x/xerrors" - - "github.com/filecoin-project/go-jsonrpc" - - "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/api/client" - "github.com/filecoin-project/lotus/api/v1api" - cliutil "github.com/filecoin-project/lotus/cli/util" -) - -func getFullNodeAPIV1Curio(ctx *cli.Context, ainfoCfg []string, opts ...cliutil.GetFullNodeOption) (v1api.FullNode, jsonrpc.ClientCloser, error) { - if tn, ok := ctx.App.Metadata["testnode-full"]; ok { - return tn.(v1api.FullNode), func() {}, nil - } - - var options cliutil.GetFullNodeOptions - for _, opt := range opts { - opt(&options) - } - - var rpcOpts []jsonrpc.Option - if options.EthSubHandler != nil { - rpcOpts = append(rpcOpts, jsonrpc.WithClientHandler("Filecoin", options.EthSubHandler), jsonrpc.WithClientHandlerAlias("eth_subscription", "Filecoin.EthSubscription")) - } - - var httpHeads []httpHead - version := "v1" - { - if len(ainfoCfg) == 0 { - return nil, nil, xerrors.Errorf("could not get API info: none configured. \nConsider getting base.toml with './curio config get base >/tmp/base.toml' \nthen adding \n[APIs] \n ChainApiInfo = [\" result_from lotus auth api-info --perm=admin \"]\n and updating it with './curio config set /tmp/base.toml'") - } - for _, i := range ainfoCfg { - ainfo := cliutil.ParseApiInfo(i) - addr, err := ainfo.DialArgs(version) - if err != nil { - return nil, nil, xerrors.Errorf("could not get DialArgs: %w", err) - } - httpHeads = append(httpHeads, httpHead{addr: addr, header: ainfo.AuthHeader()}) - } - } - - if cliutil.IsVeryVerbose { - _, _ = fmt.Fprintln(ctx.App.Writer, "using full node API v1 endpoint:", httpHeads[0].addr) - } - - var fullNodes []api.FullNode - var closers []jsonrpc.ClientCloser - - for _, head := range httpHeads { - v1api, closer, err := client.NewFullNodeRPCV1(ctx.Context, head.addr, head.header, rpcOpts...) - if err != nil { - log.Warnf("Not able to establish connection to node with addr: %s, Reason: %s", head.addr, err.Error()) - continue - } - fullNodes = append(fullNodes, v1api) - closers = append(closers, closer) - } - - // When running in cluster mode and trying to establish connections to multiple nodes, fail - // if less than 2 lotus nodes are actually running - if len(httpHeads) > 1 && len(fullNodes) < 2 { - return nil, nil, xerrors.Errorf("Not able to establish connection to more than a single node") - } - - finalCloser := func() { - for _, c := range closers { - c() - } - } - - var v1API api.FullNodeStruct - cliutil.FullNodeProxy(fullNodes, &v1API) - - v, err := v1API.Version(ctx.Context) - if err != nil { - return nil, nil, err - } - if !v.APIVersion.EqMajorMinor(api.FullAPIVersion1) { - return nil, nil, xerrors.Errorf("Remote API version didn't match (expected %s, remote %s)", api.FullAPIVersion1, v.APIVersion) - } - return &v1API, finalCloser, nil -} - -type httpHead struct { - addr string - header http.Header -} diff --git a/cmd/curio/guidedsetup/guidedsetup.go b/cmd/curio/guidedsetup/guidedsetup.go deleted file mode 100644 index 038b07e3f90..00000000000 --- a/cmd/curio/guidedsetup/guidedsetup.go +++ /dev/null @@ -1,590 +0,0 @@ -// guidedSetup for migration from lotus-miner to Curio -// -// IF STRINGS CHANGED { -// follow instructions at ../internal/translations/translations.go -// } -package guidedsetup - -import ( - "bytes" - "context" - "encoding/base64" - "encoding/json" - "fmt" - "io" - "math/bits" - "net/http" - "os" - "os/signal" - "path" - "reflect" - "strings" - "syscall" - "time" - - "github.com/BurntSushi/toml" - "github.com/charmbracelet/lipgloss" - "github.com/manifoldco/promptui" - "github.com/mitchellh/go-homedir" - "github.com/samber/lo" - "github.com/urfave/cli/v2" - "golang.org/x/text/language" - "golang.org/x/text/message" - - "github.com/filecoin-project/go-address" - "github.com/filecoin-project/go-jsonrpc" - - "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/api/v0api" - "github.com/filecoin-project/lotus/build" - "github.com/filecoin-project/lotus/chain/types" - cliutil "github.com/filecoin-project/lotus/cli/util" - _ "github.com/filecoin-project/lotus/cmd/curio/internal/translations" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/lotus/node/repo" -) - -// URL to upload user-selected fields to help direct developer's focus. -const DeveloperFocusRequestURL = "https://curiostorage.org/cgi-bin/savedata.php" - -var GuidedsetupCmd = &cli.Command{ - Name: "guided-setup", - Usage: "Run the guided setup for migrating from lotus-miner to Curio", - Flags: []cli.Flag{ - &cli.StringFlag{ // for cliutil.GetFullNodeAPI - Name: "repo", - EnvVars: []string{"LOTUS_PATH"}, - Hidden: true, - Value: "~/.lotus", - }, - }, - Action: func(cctx *cli.Context) (err error) { - T, say := SetupLanguage() - setupCtrlC(say) - - say(header, "This interactive tool migrates lotus-miner to Curio in 5 minutes.") - say(notice, "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.") - - // Run the migration steps - migrationData := MigrationData{ - T: T, - say: say, - selectTemplates: &promptui.SelectTemplates{ - Help: T("Use the arrow keys to navigate: ↓ ↑ → ← "), - }, - cctx: cctx, - } - for _, step := range migrationSteps { - step(&migrationData) - } - for _, closer := range migrationData.closers { - closer() - } - return nil - }, -} - -func setupCtrlC(say func(style lipgloss.Style, key message.Reference, a ...interface{})) { - c := make(chan os.Signal, 1) - signal.Notify(c, os.Interrupt, syscall.SIGTERM) - go func() { - <-c - say(notice, "Ctrl+C pressed in Terminal") - os.Exit(2) - }() -} - -var ( - header = lipgloss.NewStyle(). - Align(lipgloss.Left). - Foreground(lipgloss.Color("#00FF00")). - Background(lipgloss.Color("#242424")). - BorderStyle(lipgloss.NormalBorder()). - Width(60).Margin(1) - - notice = lipgloss.NewStyle(). - Align(lipgloss.Left). - Bold(true). - Foreground(lipgloss.Color("#CCCCCC")). - Background(lipgloss.Color("#333300")).MarginBottom(1) - - green = lipgloss.NewStyle(). - Align(lipgloss.Left). - Foreground(lipgloss.Color("#00FF00")). - Background(lipgloss.Color("#000000")) - - plain = lipgloss.NewStyle().Align(lipgloss.Left) - - section = lipgloss.NewStyle(). - Align(lipgloss.Left). - Foreground(lipgloss.Color("#000000")). - Background(lipgloss.Color("#FFFFFF")). - Underline(true) - - code = lipgloss.NewStyle(). - Align(lipgloss.Left). - Foreground(lipgloss.Color("#00FF00")). - Background(lipgloss.Color("#f8f9fa")) -) - -func SetupLanguage() (func(key message.Reference, a ...interface{}) string, func(style lipgloss.Style, key message.Reference, a ...interface{})) { - langText := "en" - problem := false - if len(os.Getenv("LANG")) > 1 { - langText = os.Getenv("LANG")[:2] - } else { - problem = true - } - - lang, err := language.Parse(langText) - if err != nil { - lang = language.English - problem = true - fmt.Println("Error parsing language") - } - - langs := message.DefaultCatalog.Languages() - have := lo.SliceToMap(langs, func(t language.Tag) (string, bool) { return t.String(), true }) - if _, ok := have[lang.String()]; !ok { - lang = language.English - problem = true - } - if problem { - _ = os.Setenv("LANG", "en-US") // for later users of this function - notice.Copy().AlignHorizontal(lipgloss.Right). - Render("$LANG=" + langText + " unsupported. Available: " + strings.Join(lo.Keys(have), ", ")) - fmt.Println("Defaulting to English. Please reach out to the Curio team if you would like to have additional language support.") - } - return func(key message.Reference, a ...interface{}) string { - return message.NewPrinter(lang).Sprintf(key, a...) - }, func(sty lipgloss.Style, key message.Reference, a ...interface{}) { - msg := message.NewPrinter(lang).Sprintf(key, a...) - fmt.Println(sty.Render(msg)) - } -} - -type migrationStep func(*MigrationData) - -var migrationSteps = []migrationStep{ - readMinerConfig, // Tells them to be on the miner machine - yugabyteConnect, // Miner is updated - configToDB, // work on base configuration migration. - verifySectors, // Verify the sectors are in the database - doc, - oneLastThing, - complete, -} - -type MigrationData struct { - T func(key message.Reference, a ...interface{}) string - say func(style lipgloss.Style, key message.Reference, a ...interface{}) - selectTemplates *promptui.SelectTemplates - MinerConfigPath string - MinerConfig *config.StorageMiner - DB *harmonydb.DB - MinerID address.Address - full v0api.FullNode - cctx *cli.Context - closers []jsonrpc.ClientCloser -} - -func complete(d *MigrationData) { - stepCompleted(d, d.T("Lotus-Miner to Curio Migration.")) - d.say(plain, "Try the web interface with %s for further guided improvements.", "--layers=gui") - d.say(plain, "You can now migrate your market node (%s), if applicable.", "Boost") -} -func configToDB(d *MigrationData) { - d.say(section, "Migrating lotus-miner config.toml to Curio in-database configuration.") - - { - var closer jsonrpc.ClientCloser - var err error - d.full, closer, err = cliutil.GetFullNodeAPI(d.cctx) - d.closers = append(d.closers, closer) - if err != nil { - d.say(notice, "Error getting API: %s", err.Error()) - os.Exit(1) - } - } - ainfo, err := cliutil.GetAPIInfo(d.cctx, repo.FullNode) - if err != nil { - d.say(notice, "could not get API info for FullNode: %w", err) - os.Exit(1) - } - token, err := d.full.AuthNew(context.Background(), api.AllPermissions) - if err != nil { - d.say(notice, "Error getting token: %s", err.Error()) - os.Exit(1) - } - - chainApiInfo := fmt.Sprintf("%s:%s", string(token), ainfo.Addr) - - d.MinerID, err = SaveConfigToLayer(d.MinerConfigPath, "", false, chainApiInfo) - if err != nil { - d.say(notice, "Error saving config to layer: %s. Aborting Migration", err.Error()) - os.Exit(1) - } -} - -// bucket returns the power's 4 highest bits (rounded down). -func bucket(power *api.MinerPower) uint64 { - rawQAP := power.TotalPower.QualityAdjPower.Uint64() - magnitude := lo.Max([]int{bits.Len64(rawQAP), 5}) - - // shifting erases resolution so we cannot distinguish SPs of similar scales. - return rawQAP >> (uint64(magnitude) - 4) << (uint64(magnitude - 4)) -} - -type uploadType int - -const uploadTypeIndividual uploadType = 0 -const uploadTypeAggregate uploadType = 1 - -// const uploadTypeHint uploadType = 2 -const uploadTypeNothing uploadType = 3 - -func oneLastThing(d *MigrationData) { - d.say(section, "The Curio team wants to improve the software you use. Tell the team you're using `%s`.", "curio") - i, _, err := (&promptui.Select{ - Label: d.T("Select what you want to share with the Curio team."), - Items: []string{ - d.T("Individual Data: Miner ID, Curio version, chain (%s or %s). Signed.", "mainnet", "calibration"), - d.T("Aggregate-Anonymous: version, chain, and Miner power (bucketed)."), - d.T("Hint: I am someone running Curio on whichever chain."), - d.T("Nothing.")}, - Templates: d.selectTemplates, - }).Run() - preference := uploadType(i) - if err != nil { - d.say(notice, "Aborting remaining steps.", err.Error()) - os.Exit(1) - } - if preference != uploadTypeNothing { - msgMap := map[string]any{ - "domain": "curio-newuser", - "net": build.BuildTypeString(), - } - if preference == uploadTypeIndividual || preference == uploadTypeAggregate { - // articles of incorporation - power, err := d.full.StateMinerPower(context.Background(), d.MinerID, types.EmptyTSK) - if err != nil { - d.say(notice, "Error getting miner power: %s", err.Error()) - os.Exit(1) - } - msgMap["version"] = build.BuildVersion - msgMap["net"] = build.BuildType - msgMap["power"] = map[uploadType]uint64{ - uploadTypeIndividual: power.MinerPower.QualityAdjPower.Uint64(), - uploadTypeAggregate: bucket(power)}[preference] - - if preference == uploadTypeIndividual { // Sign it - msgMap["miner_id"] = d.MinerID - msg, err := json.Marshal(msgMap) - if err != nil { - d.say(notice, "Error marshalling message: %s", err.Error()) - os.Exit(1) - } - mi, err := d.full.StateMinerInfo(context.Background(), d.MinerID, types.EmptyTSK) - if err != nil { - d.say(notice, "Error getting miner info: %s", err.Error()) - os.Exit(1) - } - sig, err := d.full.WalletSign(context.Background(), mi.Worker, msg) - if err != nil { - d.say(notice, "Error signing message: %s", err.Error()) - os.Exit(1) - } - msgMap["signature"] = base64.StdEncoding.EncodeToString(sig.Data) - } - } - msg, err := json.Marshal(msgMap) - if err != nil { - d.say(notice, "Error marshalling message: %s", err.Error()) - os.Exit(1) - } - - resp, err := http.DefaultClient.Post(DeveloperFocusRequestURL, "application/json", bytes.NewReader(msg)) - if err != nil { - d.say(notice, "Error sending message: %s", err.Error()) - } - if resp != nil { - defer func() { _ = resp.Body.Close() }() - if resp.StatusCode != 200 { - b, err := io.ReadAll(resp.Body) - if err == nil { - d.say(notice, "Error sending message: Status %s, Message: ", resp.Status, string(b)) - } - } else { - stepCompleted(d, d.T("Message sent.")) - } - } - } -} - -func doc(d *MigrationData) { - d.say(plain, "Documentation: ") - d.say(plain, "The '%s' layer stores common configuration. All curio instances can include it in their %s argument.", "base", "--layers") - d.say(plain, "You can add other layers for per-machine configuration changes.") - - d.say(plain, "Filecoin %s channels: %s and %s", "Slack", "#fil-curio-help", "#fil-curio-dev") - - d.say(plain, "Start multiple Curio instances with the '%s' layer to redundancy.", "post") - //d.say(plain, "Point your browser to your web GUI to complete setup with %s and advanced featues.", "Boost") - d.say(plain, "One database can serve multiple miner IDs: Run a migration for each lotus-miner.") -} - -func verifySectors(d *MigrationData) { - var i []int - var lastError string - fmt.Println() - d.say(section, "Please start (or restart) %s now that database credentials are in %s.", "lotus-miner", "config.toml") - d.say(notice, "Waiting for %s to write sectors into Yugabyte.", "lotus-miner") - - mid, err := address.IDFromAddress(d.MinerID) - if err != nil { - d.say(notice, "Error interpreting miner ID: %s: ID: %s", err.Error(), d.MinerID.String()) - os.Exit(1) - } - - for { - err := d.DB.Select(context.Background(), &i, ` - SELECT count(*) FROM sector_location WHERE miner_id=$1`, mid) - if err != nil { - if err.Error() != lastError { - d.say(notice, "Error verifying sectors: %s", err.Error()) - lastError = err.Error() - } - continue - } - if i[0] > 0 { - break - } - fmt.Print(".") - time.Sleep(5 * time.Second) - } - d.say(plain, "The sectors are in the database. The database is ready for %s.", "Curio") - d.say(notice, "Now shut down lotus-miner and move the systems to %s.", "Curio") - - _, err = (&promptui.Prompt{Label: d.T("Press return to continue")}).Run() - if err != nil { - d.say(notice, "Aborting migration.") - os.Exit(1) - } - stepCompleted(d, d.T("Sectors verified. %d sector locations found.", i)) -} - -func yugabyteConnect(d *MigrationData) { - harmonyCfg := config.DefaultStorageMiner().HarmonyDB //copy the config to a local variable - if d.MinerConfig != nil { - harmonyCfg = d.MinerConfig.HarmonyDB //copy the config to a local variable - } - var err error - d.DB, err = harmonydb.NewFromConfig(harmonyCfg) - if err == nil { - goto yugabyteConnected - } - for { - i, _, err := (&promptui.Select{ - Label: d.T("Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)"), - Items: []string{ - d.T("Host: %s", strings.Join(harmonyCfg.Hosts, ",")), - d.T("Port: %s", harmonyCfg.Port), - d.T("Username: %s", harmonyCfg.Username), - d.T("Password: %s", harmonyCfg.Password), - d.T("Database: %s", harmonyCfg.Database), - d.T("Continue to connect and update schema.")}, - Size: 6, - Templates: d.selectTemplates, - }).Run() - if err != nil { - d.say(notice, "Database config error occurred, abandoning migration: %s ", err.Error()) - os.Exit(1) - } - switch i { - case 0: - host, err := (&promptui.Prompt{ - Label: d.T("Enter the Yugabyte database host(s)"), - }).Run() - if err != nil { - d.say(notice, "No host provided") - continue - } - harmonyCfg.Hosts = strings.Split(host, ",") - case 1, 2, 3, 4: - val, err := (&promptui.Prompt{ - Label: d.T("Enter the Yugabyte database %s", []string{"port", "username", "password", "database"}[i-1]), - }).Run() - if err != nil { - d.say(notice, "No value provided") - continue - } - switch i { - case 1: - harmonyCfg.Port = val - case 2: - harmonyCfg.Username = val - case 3: - harmonyCfg.Password = val - case 4: - harmonyCfg.Database = val - } - continue - case 5: - d.DB, err = harmonydb.NewFromConfig(harmonyCfg) - if err != nil { - if err.Error() == "^C" { - os.Exit(1) - } - d.say(notice, "Error connecting to Yugabyte database: %s", err.Error()) - continue - } - goto yugabyteConnected - } - } - -yugabyteConnected: - d.say(plain, "Connected to Yugabyte. Schema is current.") - if !reflect.DeepEqual(harmonyCfg, d.MinerConfig.HarmonyDB) || !d.MinerConfig.Subsystems.EnableSectorIndexDB { - d.MinerConfig.HarmonyDB = harmonyCfg - d.MinerConfig.Subsystems.EnableSectorIndexDB = true - - d.say(plain, "Enabling Sector Indexing in the database.") - buf, err := config.ConfigUpdate(d.MinerConfig, config.DefaultStorageMiner()) - if err != nil { - d.say(notice, "Error encoding config.toml: %s", err.Error()) - os.Exit(1) - } - _, err = (&promptui.Prompt{ - Label: d.T("Press return to update %s with Yugabyte info. A Backup file will be written to that folder before changes are made.", "config.toml")}).Run() - if err != nil { - os.Exit(1) - } - p, err := homedir.Expand(d.MinerConfigPath) - if err != nil { - d.say(notice, "Error expanding path: %s", err.Error()) - os.Exit(1) - } - tomlPath := path.Join(p, "config.toml") - stat, err := os.Stat(tomlPath) - if err != nil { - d.say(notice, "Error reading filemode of config.toml: %s", err.Error()) - os.Exit(1) - } - fBackup, err := os.CreateTemp(p, "config-backup-*.toml") - if err != nil { - d.say(notice, "Error creating backup file: %s", err.Error()) - os.Exit(1) - } - fBackupContents, err := os.ReadFile(tomlPath) - if err != nil { - d.say(notice, "Error reading config.toml: %s", err.Error()) - os.Exit(1) - } - _, err = fBackup.Write(fBackupContents) - if err != nil { - d.say(notice, "Error writing backup file: %s", err.Error()) - os.Exit(1) - } - err = fBackup.Close() - if err != nil { - d.say(notice, "Error closing backup file: %s", err.Error()) - os.Exit(1) - } - - filemode := stat.Mode() - err = os.WriteFile(path.Join(p, "config.toml"), buf, filemode) - if err != nil { - d.say(notice, "Error writing config.toml: %s", err.Error()) - os.Exit(1) - } - d.say(section, "Restart Lotus Miner. ") - } - stepCompleted(d, d.T("Connected to Yugabyte")) -} - -func readMinerConfig(d *MigrationData) { - d.say(plain, "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.") - - verifyPath := func(dir string) (*config.StorageMiner, error) { - cfg := config.DefaultStorageMiner() - dir, err := homedir.Expand(dir) - if err != nil { - return nil, err - } - _, err = toml.DecodeFile(path.Join(dir, "config.toml"), &cfg) - return cfg, err - } - - dirs := map[string]*config.StorageMiner{"~/.lotusminer": nil, "~/.lotus-miner-local-net": nil} - if v := os.Getenv("LOTUS_MINER_PATH"); v != "" { - dirs[v] = nil - } - for dir := range dirs { - cfg, err := verifyPath(dir) - if err != nil { - delete(dirs, dir) - } - dirs[dir] = cfg - } - - var otherPath bool - if len(dirs) > 0 { - _, str, err := (&promptui.Select{ - Label: d.T("Select the location of your lotus-miner config directory?"), - Items: append(lo.Keys(dirs), d.T("Other")), - Templates: d.selectTemplates, - }).Run() - if err != nil { - if err.Error() == "^C" { - os.Exit(1) - } - otherPath = true - } else { - if str == d.T("Other") { - otherPath = true - } else { - d.MinerConfigPath = str - d.MinerConfig = dirs[str] - } - } - } - if otherPath { - minerPathEntry: - str, err := (&promptui.Prompt{ - Label: d.T("Enter the path to the configuration directory used by %s", "lotus-miner"), - }).Run() - if err != nil { - d.say(notice, "No path provided, abandoning migration ") - os.Exit(1) - } - cfg, err := verifyPath(str) - if err != nil { - d.say(notice, "Cannot read the config.toml file in the provided directory, Error: %s", err.Error()) - goto minerPathEntry - } - d.MinerConfigPath = str - d.MinerConfig = cfg - } - - // Try to lock Miner repo to verify that lotus-miner is not running - { - r, err := repo.NewFS(d.MinerConfigPath) - if err != nil { - d.say(plain, "Could not create repo from directory: %s. Aborting migration", err.Error()) - os.Exit(1) - } - lr, err := r.Lock(repo.StorageMiner) - if err != nil { - d.say(plain, "Could not lock miner repo. Your miner must be stopped: %s\n Aborting migration", err.Error()) - os.Exit(1) - } - _ = lr.Close() - } - - stepCompleted(d, d.T("Read Miner Config")) -} -func stepCompleted(d *MigrationData, step string) { - fmt.Print(green.Render("✔ ")) - d.say(plain, "Step Complete: %s\n", step) -} diff --git a/cmd/curio/guidedsetup/shared.go b/cmd/curio/guidedsetup/shared.go deleted file mode 100644 index e4b840bf2c0..00000000000 --- a/cmd/curio/guidedsetup/shared.go +++ /dev/null @@ -1,264 +0,0 @@ -package guidedsetup - -import ( - "bytes" - "context" - "encoding/base64" - "errors" - "fmt" - "os" - "path" - "strings" - - "github.com/BurntSushi/toml" - "github.com/ipfs/go-datastore" - "github.com/samber/lo" - "golang.org/x/xerrors" - - "github.com/filecoin-project/go-address" - - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/node/config" - "github.com/filecoin-project/lotus/node/modules" - "github.com/filecoin-project/lotus/node/repo" -) - -const ( - FlagMinerRepo = "miner-repo" -) - -const FlagMinerRepoDeprecation = "storagerepo" - -func SaveConfigToLayer(minerRepoPath, layerName string, overwrite bool, chainApiInfo string) (minerAddress address.Address, err error) { - _, say := SetupLanguage() - ctx := context.Background() - - r, err := repo.NewFS(minerRepoPath) - if err != nil { - return minerAddress, err - } - - ok, err := r.Exists() - if err != nil { - return minerAddress, err - } - - if !ok { - return minerAddress, fmt.Errorf("repo not initialized at: %s", minerRepoPath) - } - - lr, err := r.LockRO(repo.StorageMiner) - if err != nil { - return minerAddress, fmt.Errorf("locking repo: %w", err) - } - defer func() { - err = lr.Close() - if err != nil { - fmt.Println("error closing repo: ", err) - } - }() - - cfgNode, err := lr.Config() - if err != nil { - return minerAddress, fmt.Errorf("getting node config: %w", err) - } - smCfg := cfgNode.(*config.StorageMiner) - - db, err := harmonydb.NewFromConfig(smCfg.HarmonyDB) - if err != nil { - return minerAddress, fmt.Errorf("could not reach the database. Ensure the Miner config toml's HarmonyDB entry"+ - " is setup to reach Yugabyte correctly: %w", err) - } - - var titles []string - err = db.Select(ctx, &titles, `SELECT title FROM harmony_config WHERE LENGTH(config) > 0`) - if err != nil { - return minerAddress, fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ - " is setup to reach Yugabyte correctly: %s", err.Error()) - } - - // Copy over identical settings: - - buf, err := os.ReadFile(path.Join(lr.Path(), "config.toml")) - if err != nil { - return minerAddress, fmt.Errorf("could not read config.toml: %w", err) - } - curioCfg := config.DefaultCurioConfig() - - ensureEmptyArrays(curioCfg) - _, err = deps.LoadConfigWithUpgrades(string(buf), curioCfg) - - if err != nil { - return minerAddress, fmt.Errorf("could not decode toml: %w", err) - } - - // Populate Miner Address - mmeta, err := lr.Datastore(ctx, "/metadata") - if err != nil { - return minerAddress, xerrors.Errorf("opening miner metadata datastore: %w", err) - } - defer func() { - // _ = mmeta.Close() - }() - - maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address")) - if err != nil { - return minerAddress, xerrors.Errorf("getting miner address datastore entry: %w", err) - } - - addr, err := address.NewFromBytes(maddrBytes) - if err != nil { - return minerAddress, xerrors.Errorf("parsing miner actor address: %w", err) - } - - minerAddress = addr - - curioCfg.Addresses = []config.CurioAddresses{{ - MinerAddresses: []string{addr.String()}, - PreCommitControl: smCfg.Addresses.PreCommitControl, - CommitControl: smCfg.Addresses.CommitControl, - TerminateControl: smCfg.Addresses.TerminateControl, - DisableOwnerFallback: smCfg.Addresses.DisableOwnerFallback, - DisableWorkerFallback: smCfg.Addresses.DisableWorkerFallback, - }} - - ks, err := lr.KeyStore() - if err != nil { - return minerAddress, xerrors.Errorf("keystore err: %w", err) - } - js, err := ks.Get(modules.JWTSecretName) - if err != nil { - return minerAddress, xerrors.Errorf("error getting JWTSecretName: %w", err) - } - - curioCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) - - curioCfg.Apis.ChainApiInfo = append(curioCfg.Apis.ChainApiInfo, chainApiInfo) - // Express as configTOML - configTOML := &bytes.Buffer{} - if err = toml.NewEncoder(configTOML).Encode(curioCfg); err != nil { - return minerAddress, err - } - - if lo.Contains(titles, "base") { - // append addresses - var baseCfg = config.DefaultCurioConfig() - var baseText string - err = db.QueryRow(ctx, "SELECT config FROM harmony_config WHERE title='base'").Scan(&baseText) - if err != nil { - return minerAddress, xerrors.Errorf("Cannot load base config: %w", err) - } - ensureEmptyArrays(baseCfg) - _, err := deps.LoadConfigWithUpgrades(baseText, baseCfg) - if err != nil { - return minerAddress, xerrors.Errorf("Cannot load base config: %w", err) - } - for _, addr := range baseCfg.Addresses { - if lo.Contains(addr.MinerAddresses, curioCfg.Addresses[0].MinerAddresses[0]) { - goto skipWritingToBase - } - } - // write to base - { - baseCfg.Addresses = append(baseCfg.Addresses, curioCfg.Addresses[0]) - baseCfg.Addresses = lo.Filter(baseCfg.Addresses, func(a config.CurioAddresses, _ int) bool { - return len(a.MinerAddresses) > 0 - }) - - cb, err := config.ConfigUpdate(baseCfg, config.DefaultCurioConfig(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) - if err != nil { - return minerAddress, xerrors.Errorf("cannot interpret config: %w", err) - } - _, err = db.Exec(ctx, "UPDATE harmony_config SET config=$1 WHERE title='base'", string(cb)) - if err != nil { - return minerAddress, xerrors.Errorf("cannot update base config: %w", err) - } - say(plain, "Configuration 'base' was updated to include this miner's address and its wallet setup.") - } - say(plain, "Compare the configurations %s to %s. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", "base", "mig-"+curioCfg.Addresses[0].MinerAddresses[0]) - skipWritingToBase: - } else if layerName == "" { - cfg, err := deps.GetDefaultConfig(true) - if err != nil { - return minerAddress, xerrors.Errorf("Cannot get default config: %w", err) - } - _, err = db.Exec(ctx, `INSERT INTO harmony_config (title, config) VALUES ('base', $1) - ON CONFLICT(title) DO UPDATE SET config=EXCLUDED.config`, cfg) - - if err != nil { - return minerAddress, xerrors.Errorf("Cannot insert base config: %w", err) - } - say(notice, "Configuration 'base' was created to include this miner's address and its wallet setup.") - } - - if layerName == "" { // only make mig if base exists and we are different. // compare to base. - layerName = fmt.Sprintf("mig-%s", curioCfg.Addresses[0].MinerAddresses[0]) - overwrite = true - } else { - if lo.Contains(titles, layerName) && !overwrite { - return minerAddress, errors.New("the overwrite flag is needed to replace existing layer: " + layerName) - } - } - if overwrite { - _, err := db.Exec(ctx, "DELETE FROM harmony_config WHERE title=$1", layerName) - if err != nil { - return minerAddress, xerrors.Errorf("Cannot delete existing layer: %w", err) - } - } - - _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ($1, $2)", layerName, configTOML.String()) - if err != nil { - return minerAddress, xerrors.Errorf("Cannot insert layer after layer created message: %w", err) - } - say(plain, "Layer %s created. ", layerName) - - dbSettings := getDBSettings(*smCfg) - say(plain, "To work with the config: ") - fmt.Println(code.Render(`curio ` + dbSettings + ` config edit base`)) - say(plain, `To run Curio: With machine or cgroup isolation, use the command (with example layer selection):`) - fmt.Println(code.Render(`curio ` + dbSettings + ` run --layer=post`)) - return minerAddress, nil -} - -func getDBSettings(smCfg config.StorageMiner) string { - dbSettings := "" - def := config.DefaultStorageMiner().HarmonyDB - if def.Hosts[0] != smCfg.HarmonyDB.Hosts[0] { - dbSettings += ` --db-host="` + strings.Join(smCfg.HarmonyDB.Hosts, ",") + `"` - } - if def.Port != smCfg.HarmonyDB.Port { - dbSettings += " --db-port=" + smCfg.HarmonyDB.Port - } - if def.Username != smCfg.HarmonyDB.Username { - dbSettings += ` --db-user="` + smCfg.HarmonyDB.Username + `"` - } - if def.Password != smCfg.HarmonyDB.Password { - dbSettings += ` --db-password="` + smCfg.HarmonyDB.Password + `"` - } - if def.Database != smCfg.HarmonyDB.Database { - dbSettings += ` --db-name="` + smCfg.HarmonyDB.Database + `"` - } - return dbSettings -} - -func ensureEmptyArrays(cfg *config.CurioConfig) { - if cfg.Addresses == nil { - cfg.Addresses = []config.CurioAddresses{} - } else { - for i := range cfg.Addresses { - if cfg.Addresses[i].PreCommitControl == nil { - cfg.Addresses[i].PreCommitControl = []string{} - } - if cfg.Addresses[i].CommitControl == nil { - cfg.Addresses[i].CommitControl = []string{} - } - if cfg.Addresses[i].TerminateControl == nil { - cfg.Addresses[i].TerminateControl = []string{} - } - } - } - if cfg.Apis.ChainApiInfo == nil { - cfg.Apis.ChainApiInfo = []string{} - } -} diff --git a/cmd/curio/internal/translations/catalog.go b/cmd/curio/internal/translations/catalog.go deleted file mode 100644 index 1aca330334c..00000000000 --- a/cmd/curio/internal/translations/catalog.go +++ /dev/null @@ -1,331 +0,0 @@ -// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. - -package translations - -import ( - "golang.org/x/text/language" - "golang.org/x/text/message" - "golang.org/x/text/message/catalog" -) - -type dictionary struct { - index []uint32 - data string -} - -func (d *dictionary) Lookup(key string) (data string, ok bool) { - p, ok := messageKeyToIndex[key] - if !ok { - return "", false - } - start, end := d.index[p], d.index[p+1] - if start == end { - return "", false - } - return d.data[start:end], true -} - -func init() { - dict := map[string]catalog.Dictionary{ - "en": &dictionary{index: enIndex, data: enData}, - "ko": &dictionary{index: koIndex, data: koData}, - "zh": &dictionary{index: zhIndex, data: zhData}, - } - fallback := language.MustParse("en") - cat, err := catalog.NewFromMap(dict, catalog.Fallback(fallback)) - if err != nil { - panic(err) - } - message.DefaultCatalog = cat -} - -var messageKeyToIndex = map[string]int{ - "Aborting migration.": 41, - "Aborting remaining steps.": 19, - "Aggregate-Anonymous: version, net, and Miner power (bucketed).": 16, - "Cannot read the config.toml file in the provided directory, Error: %s": 70, - "Compare the configurations %s to %s. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.": 76, - "Configuration 'base' was created to include this miner's address and its wallet setup.": 77, - "Configuration 'base' was updated to include this miner's address and its wallet setup.": 75, - "Connected to Yugabyte": 64, - "Connected to Yugabyte. Schema is current.": 56, - "Continue to connect and update schema.": 49, - "Could not create repo from directory: %s. Aborting migration": 71, - "Could not lock miner repo. Your miner must be stopped: %s\n Aborting migration": 72, - "Ctrl+C pressed in Terminal": 3, - "Database config error occurred, abandoning migration: %s ": 50, - "Database: %s": 48, - "Documentation: ": 27, - "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.": 1, - "Enabling Sector Indexing in the database.": 57, - "Enter the Yugabyte database %s": 53, - "Enter the Yugabyte database host(s)": 51, - "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)": 43, - "Enter the path to the configuration directory used by %s": 68, - "Error connecting to Yugabyte database: %s": 55, - "Error connecting to lotus node: %s %s": 9, - "Error encoding config.toml: %s": 58, - "Error expanding path: %s": 60, - "Error getting miner info: %s": 22, - "Error getting miner power: %s": 20, - "Error getting token: %s": 11, - "Error interpreting miner ID: %s: ID: %s": 36, - "Error marshalling message: %s": 21, - "Error reading filemode of config.toml: %s": 61, - "Error reading from database: %s. Aborting Migration.": 8, - "Error saving config to layer: %s. Aborting Migration": 12, - "Error sending message: %s": 24, - "Error sending message: Status %s, Message: ": 25, - "Error signing message: %s": 23, - "Error verifying sectors: %s": 37, - "Error writing config.toml: %s": 62, - "Filecoin %s channels: %s and %s": 30, - "Hint: I am someone running Curio on net.": 17, - "Host: %s": 44, - "Individual Data: Miner ID, Curio version, net (%s or %s). Signed.": 15, - "Layer %s created. ": 78, - "Lotus-Miner to Curio Migration.": 4, - "Message sent.": 26, - "Migrating config.toml to database.": 7, - "No host provided": 52, - "No path provided, abandoning migration ": 69, - "No value provided": 54, - "Nothing.": 18, - "Now shut down lotus-miner and move the systems to %s.": 39, - "One database can serve multiple miner IDs: Run a migration for each lotus-miner.": 33, - "Other": 67, - "Password: %s": 47, - "Please start (or restart) %s now that database credentials are in %s.": 34, - "Point your browser to your web GUI to complete setup with %s and advanced featues.": 32, - "Port: %s": 45, - "Press return to continue": 40, - "Press return to update %s with Yugabyte info. Backup the file now.": 59, - "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.": 13, - "Read Miner Config": 73, - "Restart Lotus Miner. ": 63, - "Sectors verified. %d sector locations found.": 42, - "Select the location of your lotus-miner config directory?": 66, - "Select what you want to share with the Curio team.": 14, - "Start multiple Curio instances with the '%s' layer to redundancy.": 31, - "Step Complete: %s\n": 74, - "The '%s' layer stores common configuration. All curio instances can include it in their %s argument.": 28, - "The sectors are in the database. The database is ready for %s.": 38, - "This interactive tool migrates lotus-miner to Curio in 5 minutes.": 0, - "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):": 80, - "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.": 65, - "To work with the config: ": 79, - "Try the web interface with %s for further guided improvements.": 5, - "Use the arrow keys to navigate: ↓ ↑ → ← ": 2, - "Username: %s": 46, - "Waiting for %s to write sectors into Yugabyte.": 35, - "You can add other layers for per-machine configuration changes.": 29, - "You can now migrate your market node (%s), if applicable.": 6, - "could not get API info for FullNode: %w": 10, -} - -var enIndex = []uint32{ // 82 elements - // Entry 0 - 1F - 0x00000000, 0x00000042, 0x0000009b, 0x000000d0, - 0x000000eb, 0x0000010b, 0x0000014d, 0x0000018a, - 0x000001ad, 0x000001e5, 0x00000211, 0x0000023c, - 0x00000257, 0x0000028f, 0x000002e6, 0x00000319, - 0x00000361, 0x000003a0, 0x000003c9, 0x000003d2, - 0x000003ec, 0x0000040d, 0x0000042e, 0x0000044e, - 0x0000046b, 0x00000488, 0x000004bb, 0x000004c9, - 0x000004dd, 0x00000548, 0x00000588, 0x000005b1, - // Entry 20 - 3F - 0x000005f6, 0x0000064c, 0x0000069d, 0x000006e9, - 0x0000071b, 0x00000749, 0x00000768, 0x000007aa, - 0x000007e3, 0x000007fc, 0x00000810, 0x00000840, - 0x000008a2, 0x000008ae, 0x000008ba, 0x000008ca, - 0x000008da, 0x000008ea, 0x00000911, 0x00000952, - 0x00000976, 0x00000987, 0x000009a9, 0x000009bb, - 0x000009e8, 0x00000a12, 0x00000a3c, 0x00000a5e, - 0x00000aa4, 0x00000ac0, 0x00000aed, 0x00000b0e, - // Entry 40 - 5F - 0x00000b28, 0x00000b3e, 0x00000b8b, 0x00000bc5, - 0x00000bcb, 0x00000c07, 0x00000c33, 0x00000c7c, - 0x00000cbc, 0x00000d0d, 0x00000d1f, 0x00000d39, - 0x00000d90, 0x00000e2d, 0x00000e84, 0x00000e9e, - 0x00000ebc, 0x00000f1c, -} // Size: 352 bytes - -const enData string = "" + // Size: 3868 bytes - "\x02This interactive tool migrates lotus-miner to Curio in 5 minutes." + - "\x02Each step needs your confirmation and can be reversed. Press Ctrl+C " + - "to exit at any time.\x04\x00\x01 0\x02Use the arrow keys to navigate: ↓ " + - "↑ → ←\x02Ctrl+C pressed in Terminal\x02Lotus-Miner to Curio Migration." + - "\x02Try the web interface with %[1]s for further guided improvements." + - "\x02You can now migrate your market node (%[1]s), if applicable.\x02Migr" + - "ating config.toml to database.\x02Error reading from database: %[1]s. Ab" + - "orting Migration.\x02Error connecting to lotus node: %[1]s %[2]s\x02coul" + - "d not get API info for FullNode: %[1]w\x02Error getting token: %[1]s\x02" + - "Error saving config to layer: %[1]s. Aborting Migration\x02Protocol Labs" + - " wants to improve the software you use. Tell the team you're using Curio" + - ".\x02Select what you want to share with the Curio team.\x02Individual Da" + - "ta: Miner ID, Curio version, net (%[1]s or %[2]s). Signed.\x02Aggregate-" + - "Anonymous: version, net, and Miner power (bucketed).\x02Hint: I am someo" + - "ne running Curio on net.\x02Nothing.\x02Aborting remaining steps.\x02Err" + - "or getting miner power: %[1]s\x02Error marshalling message: %[1]s\x02Err" + - "or getting miner info: %[1]s\x02Error signing message: %[1]s\x02Error se" + - "nding message: %[1]s\x04\x00\x01 .\x02Error sending message: Status %[1]" + - "s, Message:\x02Message sent.\x04\x00\x01 \x0f\x02Documentation:\x02The '" + - "%[1]s' layer stores common configuration. All curio instances can includ" + - "e it in their %[2]s argument.\x02You can add other layers for per-machin" + - "e configuration changes.\x02Filecoin %[1]s channels: %[2]s and %[3]s\x02" + - "Start multiple Curio instances with the '%[1]s' layer to redundancy.\x02" + - "Point your browser to your web GUI to complete setup with %[1]s and adva" + - "nced featues.\x02One database can serve multiple miner IDs: Run a migrat" + - "ion for each lotus-miner.\x02Please start (or restart) %[1]s now that da" + - "tabase credentials are in %[2]s.\x02Waiting for %[1]s to write sectors i" + - "nto Yugabyte.\x02Error interpreting miner ID: %[1]s: ID: %[2]s\x02Error " + - "verifying sectors: %[1]s\x02The sectors are in the database. The databas" + - "e is ready for %[1]s.\x02Now shut down lotus-miner and move the systems " + - "to %[1]s.\x02Press return to continue\x02Aborting migration.\x02Sectors " + - "verified. %[1]d sector locations found.\x02Enter the info to connect to " + - "your Yugabyte database installation (https://download.yugabyte.com/)\x02" + - "Host: %[1]s\x02Port: %[1]s\x02Username: %[1]s\x02Password: %[1]s\x02Data" + - "base: %[1]s\x02Continue to connect and update schema.\x04\x00\x01 <\x02D" + - "atabase config error occurred, abandoning migration: %[1]s\x02Enter the " + - "Yugabyte database host(s)\x02No host provided\x02Enter the Yugabyte data" + - "base %[1]s\x02No value provided\x02Error connecting to Yugabyte database" + - ": %[1]s\x02Connected to Yugabyte. Schema is current.\x02Enabling Sector " + - "Indexing in the database.\x02Error encoding config.toml: %[1]s\x02Press " + - "return to update %[1]s with Yugabyte info. Backup the file now.\x02Error" + - " expanding path: %[1]s\x02Error reading filemode of config.toml: %[1]s" + - "\x02Error writing config.toml: %[1]s\x04\x00\x01 \x15\x02Restart Lotus M" + - "iner.\x02Connected to Yugabyte\x02To start, ensure your sealing pipeline" + - " is drained and shut-down lotus-miner.\x02Select the location of your lo" + - "tus-miner config directory?\x02Other\x02Enter the path to the configurat" + - "ion directory used by %[1]s\x04\x00\x01 '\x02No path provided, abandonin" + - "g migration\x02Cannot read the config.toml file in the provided director" + - "y, Error: %[1]s\x02Could not create repo from directory: %[1]s. Aborting" + - " migration\x02Could not lock miner repo. Your miner must be stopped: %[1" + - "]s\x0a Aborting migration\x02Read Miner Config\x04\x00\x01\x0a\x15\x02St" + - "ep Complete: %[1]s\x02Configuration 'base' was updated to include this m" + - "iner's address and its wallet setup.\x02Compare the configurations %[1]s" + - " to %[2]s. Changes between the miner IDs other than wallet addreses shou" + - "ld be a new, minimal layer for runners that need it.\x02Configuration 'b" + - "ase' was created to include this miner's address and its wallet setup." + - "\x04\x00\x01 \x15\x02Layer %[1]s created.\x04\x00\x01 \x19\x02To work wi" + - "th the config:\x02To run Curio: With machine or cgroup isolation, use th" + - "e command (with example layer selection):" - -var koIndex = []uint32{ // 82 elements - // Entry 0 - 1F - 0x00000000, 0x0000004d, 0x000000c8, 0x0000010c, - 0x0000012d, 0x00000150, 0x00000150, 0x000001a0, - 0x000001da, 0x0000022f, 0x0000022f, 0x0000022f, - 0x0000022f, 0x00000287, 0x00000315, 0x0000034e, - 0x000003aa, 0x000003f4, 0x00000437, 0x00000452, - 0x00000477, 0x000004b1, 0x000004e4, 0x0000051e, - 0x00000548, 0x00000572, 0x000005b4, 0x000005d8, - 0x000005e5, 0x0000066b, 0x000006bd, 0x000006bd, - // Entry 20 - 3F - 0x000006bd, 0x0000071e, 0x0000071e, 0x0000071e, - 0x00000762, 0x00000762, 0x00000789, 0x000007f4, - 0x0000083e, 0x00000865, 0x00000880, 0x000008cf, - 0x0000093d, 0x0000094e, 0x0000095c, 0x00000974, - 0x00000988, 0x000009a2, 0x000009cc, 0x00000a2f, - 0x00000a6b, 0x00000a95, 0x00000acd, 0x00000af1, - 0x00000b45, 0x00000b86, 0x00000b86, 0x00000bcd, - 0x00000c39, 0x00000c39, 0x00000c88, 0x00000cc6, - // Entry 40 - 5F - 0x00000cea, 0x00000d00, 0x00000d6b, 0x00000dba, - 0x00000dc1, 0x00000e09, 0x00000e5b, 0x00000eb5, - 0x00000eb5, 0x00000eb5, 0x00000ecd, 0x00000ee7, - 0x00000f51, 0x0000100b, 0x0000106f, 0x0000109e, - 0x0000109e, 0x0000112a, -} // Size: 352 bytes - -const koData string = "" + // Size: 4394 bytes - "\x02ė´ 대화형 도ęĩŦ는 5ëļ„ ė•ˆė— lotus-minerëĨŧ Curio로 ė´ėŖŧ합니다.\x02각 단ęŗ„는 확ė¸ė´ 필ėš”하늰 되돌ëĻ´ ėˆ˜ ėžˆ" + - "ėŠĩ니다. ė–¸ė œë“ ė§€ Ctrl+CëĨŧ 눌ëŸŦ ėĸ…ëŖŒí•  ėˆ˜ ėžˆėŠĩ니다.\x04\x00\x01 ?\x02화ė‚´í‘œ 키ëĨŧ ė‚ŦėšŠí•˜ė—Ŧ ė´ë™í•˜ė„¸ėš”: ↓" + - " ↑ → ←\x02터미널ė—ė„œ Ctrl+C가 눌ëĻŧ\x02Lotus-Minerė—ė„œ Curio로 ė´ėŖŧ.\x02해당하는 ę˛Ŋėš° ė´ė œ ė‹œėžĨ " + - "노드ëĨŧ ė´ėŖŧ할 ėˆ˜ ėžˆėŠĩ니다 (%[1]s).\x02config.tomlė„ 데ė´í„°ë˛ ė´ėŠ¤ëĄœ ė´ėŖŧ ė¤‘ėž…니다.\x02데ė´í„°ë˛ ė´ėŠ¤ė—ė„œ ėŊ" + - "는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: %[1]s. 마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘단.\x02레ė´ė–´ė— ęĩŦė„ąė„ ė €ėžĨ하는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: %[1]s. 마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘" + - "단\x02Protocol Labs는 당ė‹ ė´ ė‚ŦėšŠí•˜ëŠ” ė†Œí”„트ė›¨ė–´ëĨŧ 개ė„ í•˜ęŗ  ė‹ļė–´í•Šë‹ˆë‹¤. CurioëĨŧ ė‚ŦėšŠ ė¤‘ė´ëŧęŗ  팀ė— ė•Œë ¤ėŖŧė„¸" + - "ėš”.\x02Curio 팀ęŗŧ ęŗĩėœ í•˜ęŗ  ė‹ļė€ 것ė„ ė„ íƒí•˜ė„¸ėš”.\x02개ëŗ„ 데ė´í„°: 마ė´ë„ˆ ID, Curio 버ė „, 네트ė›ŒíŦ (%[" + - "1]s 또는 %[2]s). ė„œëĒ…됨.\x02ė§‘ęŗ„-ėĩëĒ…: 버ė „, 네트ė›ŒíŦ, ꡸ëĻŦęŗ  마ė´ë„ˆ 파ė›Œ (버킷).\x02힌트: 네트ė›ŒíŦė—ė„œ C" + - "urioëĨŧ ė‹¤í–‰ ė¤‘ė¸ ė‚Ŧ람ėž…니다.\x02ė•„ëŦ´ę˛ƒë„ ė—†ėŠĩ니다.\x02나머ė§€ 단ęŗ„ëĨŧ ė¤‘단핊니다.\x02마ė´ë„ˆ 파ė›ŒëĨŧ 가ė ¸ė˜¤ëŠ” ė¤‘ ė˜¤ëĨ˜ " + - "발ėƒ: %[1]s\x02메ė‹œė§€ëĨŧ 마ėƒŦ하는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: %[1]s\x02마ė´ë„ˆ ė •ëŗ´ëĨŧ 가ė ¸ė˜¤ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: %[1]s" + - "\x02메ė‹œė§€ ė„œëĒ… ė¤‘ ė˜¤ëĨ˜ 발ėƒ: %[1]s\x02메ė‹œė§€ ė „ė†Ą ė¤‘ ė˜¤ëĨ˜ 발ėƒ: %[1]s\x04\x00\x01 =\x02메ė‹œė§€ " + - "ė „ė†Ą ė¤‘ ė˜¤ëĨ˜ 발ėƒ: ėƒíƒœ %[1]s, 메ė‹œė§€:\x02메ė‹œė§€ę°€ ė „ė†Ąë˜ė—ˆėŠĩ니다.\x04\x00\x01 \x08\x02ëŦ¸ė„œ:" + - "\x02'%[1]s' 레ė´ė–´ė—ëŠ” ęŗĩí†ĩ ęĩŦė„ąė´ ė €ėžĨ됩니다. ëĒ¨ë“  Curio ė¸ėŠ¤í„´ėŠ¤ëŠ” %[2]s ė¸ėˆ˜ė— íŦ함ė‹œí‚Ŧ ėˆ˜ ėžˆėŠĩ니다." + - "\x02기ęŗ„ëŗ„ ęĩŦė„ą ëŗ€ę˛Ŋė„ ėœ„í•´ 다ëĨ¸ 레ė´ė–´ëĨŧ ėļ”가할 ėˆ˜ ėžˆėŠĩ니다.\x02브ëŧėš°ė €ëĨŧ ė›š GUI로 ė´ë™í•˜ė—Ŧ %[1]s 및 ęŗ ę¸‰ 기ëŠĨ" + - "ėœŧ로 ė„¤ė •ė„ ė™„ëŖŒí•˜ė„¸ėš”.\x02%[1]s가 Yugabyteė— ė„ší„°ëĨŧ 기록하도록 대기 ė¤‘ėž…니다.\x02ė„ší„° 확ė¸ ė¤‘ ė˜¤ëĨ˜ 발ėƒ:" + - " %[1]s\x02ė„ší„°ę°€ 데ė´í„°ë˛ ė´ėŠ¤ė— ėžˆėŠĩ니다. 데ė´í„°ë˛ ė´ėŠ¤ę°€ %[1]sëĨŧ ėœ„í•´ ė¤€ëš„되ė—ˆėŠĩ니다.\x02ė´ė œ lotus-miner" + - "ëĨŧ ėĸ…ëŖŒí•˜ęŗ  ė‹œėŠ¤í…œė„ %[1]s로 ė´ë™í•˜ė„¸ėš”.\x02ęŗ„ė†í•˜ë ¤ëŠ´ ëĻŦ턴ė„ 누ëĨ´ė„¸ėš”\x02마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘단.\x02ė„ší„°ę°€ 확ė¸ë˜ė—ˆėŠĩ" + - "니다. %[1]d개ė˜ ė„ší„° ėœ„ėš˜ëĨŧ ė°žė•˜ėŠĩ니다.\x02Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ ė„¤ėš˜ė— ė—°ę˛°í•  ė •ëŗ´ëĨŧ ėž…ë Ĩ하ė‹­ė‹œė˜¤ (https" + - "://download.yugabyte.com/)\x02호ėŠ¤íŠ¸: %[1]s\x02íŦ트: %[1]s\x02ė‚ŦėšŠėž ė´ëĻ„: %[1]s" + - "\x02비밀번호: %[1]s\x02데ė´í„°ë˛ ė´ėŠ¤: %[1]s\x02ęŗ„ė† ė—°ę˛° 및 ėŠ¤í‚¤ë§ˆ ė—…데ė´íŠ¸.\x04\x00\x01 ^\x02데" + - "ė´í„°ë˛ ė´ėŠ¤ ęĩŦė„ą ė˜¤ëĨ˜ę°€ 발ėƒí•˜ė—Ŧ 마ė´ęˇ¸ë ˆė´ė…˜ė„ íŦ기합니다: %[1]s\x02Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ 호ėŠ¤íŠ¸ëĨŧ ėž…ë Ĩ하ė‹­ė‹œė˜¤" + - "\x02호ėŠ¤íŠ¸ę°€ ė œęŗĩ되ė§€ ė•Šė•˜ėŠĩ니다\x02Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ %[1]sė„ ėž…ë Ĩ하ė‹­ė‹œė˜¤\x02값ė´ ė œęŗĩ되ė§€ ė•Šė•˜ėŠĩ니다" + - "\x02Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ė— ė—°ę˛°í•˜ëŠ” ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: %[1]s\x02Yugabyteė— ė—°ę˛°ë˜ė—ˆėŠĩ니다. ėŠ¤í‚¤ë§ˆę°€" + - " 현ėžŦėž…니다.\x02config.tomlė„ ė¸ėŊ”딊하는 ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: %[1]s\x02%[1]sė„ Yugabyte ė •ëŗ´ëĄœ" + - " ė—…데ė´íŠ¸í•˜ë ¤ëŠ´ ëĻŦ턴ė„ 누ëĨ´ė„¸ėš”. ė§€ę¸ˆ 파ėŧė„ ë°ąė—…하ė„¸ėš”.\x02config.tomlė˜ 파ėŧ ëĒ¨ë“œëĨŧ ėŊ는 ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다:" + - " %[1]s\x02config.tomlė„ ė“°ëŠ” ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: %[1]s\x04\x00\x01 \x1f\x02로터ėŠ¤ 마ė´" + - "너 ėžŦė‹œėž‘.\x02Yugabyteė— ė—°ę˛°ë¨\x02ė‹œėž‘하려늴 밀봉 파ė´í”„ëŧė¸ė´ 비ė–´ ėžˆęŗ  lotus-miner가 ėĸ…ëŖŒë˜ė—ˆëŠ”ė§€ 확" + - "ė¸í•˜ė„¸ėš”.\x02로터ėŠ¤ 마ė´ë„ˆ ęĩŦė„ą 디렉토ëĻŦė˜ ėœ„ėš˜ëĨŧ ė„ íƒí•˜ė‹œę˛ ėŠĩ니까?\x02기타\x02%[1]sė—ė„œ ė‚ŦėšŠí•˜ëŠ” ęĩŦė„ą 디렉터ëĻŦ " + - "ę˛Ŋ로ëĨŧ ėž…ë Ĩ하ė„¸ėš”.\x04\x00\x01 M\x02ę˛Ŋ로가 ė œęŗĩ되ė§€ ė•Šė•˜ėœŧë¯€ëĄœ 마ė´ęˇ¸ë ˆė´ė…˜ė„ íŦ기합니다\x02ė œęŗĩ된 디렉토ëĻŦė—ė„œ" + - " config.toml 파ėŧė„ ėŊė„ ėˆ˜ ė—†ėŠĩ니다. ė˜¤ëĨ˜: %[1]s\x02마ė´ë„ˆ ęĩŦė„ą ėŊ기\x04\x00\x01\x0a\x15" + - "\x02단ęŗ„ ė™„ëŖŒ: %[1]s\x02ė´ 마ė´ë„ˆė˜ ėŖŧė†Œė™€ ė§€ę°‘ ė„¤ė •ė„ íŦ함하도록 ęĩŦė„ą 'base'가 ė—…데ė´íŠ¸ë˜ė—ˆėŠĩ니다.\x02ęĩŦė„ą " + - "%[1]sëĨŧ %[2]sęŗŧ 비ęĩí•˜ė„¸ėš”. ė§€ę°‘ ėŖŧė†Œ ė´ė™¸ė˜ 마ė´ë„ˆ ID ė‚Ŧė´ė˜ ëŗ€ę˛Ŋ ė‚Ŧ항ė€ 필ėš”í•œ ė‹¤í–‰ėžëĨŧ ėœ„í•œ ėƒˆëĄœėš´ ėĩœė†Œí•œė˜ 레ė´" + - "ė–´ė—Ŧė•ŧ 합니다.\x02ė´ 마ė´ë„ˆė˜ ėŖŧė†Œė™€ ė§€ę°‘ ė„¤ė •ė„ íŦ함하도록 ęĩŦė„ą 'base'가 ėƒė„ąë˜ė—ˆėŠĩ니다.\x04\x00\x01 *" + - "\x02레ė´ė–´ %[1]s가 ėƒė„ąë˜ė—ˆėŠĩ니다.\x02CurioëĨŧ ė‹¤í–‰í•˜ë ¤ëŠ´: 기ęŗ„ 또는 cgroup 겊ëĻŦëĨŧ ė‚ŦėšŠí•˜ė—Ŧ 다ėŒ ëĒ…ë šė„ ė‚ŦėšŠ" + - "하ė„¸ėš” (ė˜ˆė œ 레ė´ė–´ ė„ íƒęŗŧ 함ęģ˜):" - -var zhIndex = []uint32{ // 82 elements - // Entry 0 - 1F - 0x00000000, 0x00000048, 0x00000097, 0x000000ca, - 0x000000e3, 0x00000100, 0x00000100, 0x00000141, - 0x0000016b, 0x000001a4, 0x000001a4, 0x000001a4, - 0x000001a4, 0x000001dd, 0x0000022f, 0x0000025c, - 0x000002a9, 0x000002e7, 0x00000317, 0x00000321, - 0x00000337, 0x0000035b, 0x00000379, 0x0000039d, - 0x000003bb, 0x000003d9, 0x0000040e, 0x00000421, - 0x00000430, 0x0000048a, 0x000004c7, 0x000004c7, - // Entry 20 - 3F - 0x000004c7, 0x0000051e, 0x0000051e, 0x0000051e, - 0x00000544, 0x00000544, 0x00000562, 0x0000059e, - 0x000005d0, 0x000005e0, 0x000005f0, 0x00000623, - 0x0000067d, 0x0000068c, 0x0000069b, 0x000006ad, - 0x000006bc, 0x000006ce, 0x000006ed, 0x00000725, - 0x0000074a, 0x0000075a, 0x00000778, 0x00000785, - 0x000007b1, 0x000007de, 0x000007de, 0x00000801, - 0x00000845, 0x00000845, 0x00000874, 0x00000897, - // Entry 40 - 5F - 0x000008b7, 0x000008cc, 0x00000917, 0x00000947, - 0x0000094e, 0x00000978, 0x0000099c, 0x000009e0, - 0x000009e0, 0x000009e0, 0x000009f3, 0x00000a0d, - 0x00000a59, 0x00000adb, 0x00000b27, 0x00000b41, - 0x00000b41, 0x00000b98, -} // Size: 352 bytes - -const zhData string = "" + // Size: 2968 bytes - "\x02čŋ™ä¸Ēäē¤äē’åŧåˇĨå…ˇå¯äģĨ在5分钟内将lotus-minerčŋį§ģ到Curio。\x02每一æ­ĨéƒŊ需čĻæ‚¨įš„įĄŽčŽ¤īŧŒåšļ且可äģĨ撤销。随æ—ļ按Ctrl+C退å‡ē" + - "。\x04\x00\x01 .\x02äŊŋį”¨įŽ­å¤´é”Žčŋ›čĄŒå¯ŧčˆĒīŧšâ†“ ↑ → ←\x02在įģˆįĢ¯ä¸­æŒ‰ä¸‹Ctrl+C\x02Lotus-Miner到Cu" + - "riočŋį§ģ。\x02åĻ‚果适į”¨īŧŒæ‚¨įŽ°åœ¨å¯äģĨčŋį§ģ您įš„市åœē节į‚š(%[1]s)。\x02æ­Ŗ在将config.tomlčŋį§ģ到数捎åē“。\x02č¯ģ取数捎åē“æ—ļå‡ē" + - "错īŧš%[1]s。æ­Ŗ在中æ­ĸčŋį§ģ。\x02äŋå­˜é…įŊŽåˆ°åą‚æ—ļå‡ē错īŧš%[1]s。æ­Ŗ在中æ­ĸčŋį§ģ\x02Protocol Labs希望攚čŋ›æ‚¨äŊŋį”¨įš„čŊ¯äģļ。告" + - "č¯‰å›ĸ队您æ­Ŗ在äŊŋį”¨Curio。\x02选拊您æƒŗ与Curioå›ĸ队分äēĢįš„内厚。\x02ä¸Ēäēē数捎īŧšįŸŋåˇĨID、Curioį‰ˆæœŦ、įŊ‘įģœ(%[1]s或%[2" + - "]s)ã€‚åˇ˛į­žåã€‚\x02čšåˆ-åŒŋ名īŧšį‰ˆæœŦ、įŊ‘įģœå’ŒįŸŋåˇĨ功įŽ‡īŧˆåˆ†æĄļīŧ‰ã€‚\x02提į¤ēīŧšæˆ‘是在įŊ‘įģœä¸ŠčŋčĄŒCurioįš„äēē。\x02æ˛Ąæœ‰ã€‚\x02中æ­ĸ削äŊ™æ­Ĩ" + - "éĒ¤ã€‚\x02čŽˇå–įŸŋåˇĨ功įŽ‡æ—ļå‡ē错īŧš%[1]s\x02整į†æļˆæ¯æ—ļå‡ē错īŧš%[1]s\x02čŽˇå–įŸŋåˇĨäŋĄæ¯æ—ļå‡ē错īŧš%[1]s\x02į­žįŊ˛æļˆæ¯æ—ļå‡ē错īŧš%" + - "[1]s\x02发送æļˆæ¯æ—ļå‡ē错īŧš%[1]s\x04\x00\x01 0\x02发送æļˆæ¯æ—ļå‡ē错īŧšįŠļ态%[1]sīŧŒæļˆæ¯īŧš\x02æļˆæ¯åˇ˛å‘送。\x04" + - "\x00\x01 \x0a\x02文æĄŖīŧš\x02'%[1]s'åą‚å­˜å‚¨é€šį”¨é…įŊŽã€‚所有Curio厞䞋éƒŊ可äģĨ在å…ļ%[2]s参数中包åĢ厃。\x02您可äģĨ" + - "æˇģ加å…ļäģ–åą‚čŋ›čĄŒæ¯å°æœē器įš„配įŊŽæ›´æ”šã€‚\x02将您įš„æĩč§ˆå™¨æŒ‡å‘您įš„įŊ‘įģœGUIīŧŒäģĨäŊŋį”¨%[1]s和éĢ˜įē§åŠŸčƒŊåŽŒæˆčŽžįŊŽã€‚\x02į­‰åž…%[1]s将扇åŒē写" + - "å…ĨYugabyte。\x02éĒŒč¯æ‰‡åŒēæ—ļå‡ē错īŧš%[1]s\x02扇åŒē在数捎åē“中。数捎åē“åˇ˛å‡†å¤‡åĨŊį”¨äēŽ%[1]s。\x02įŽ°åœ¨å…ŗ闭lotus-mi" + - "neråšļ将įŗģįģŸį§ģč‡ŗ%[1]s。\x02按回čŊĻįģ§įģ­\x02中æ­ĸčŋį§ģ。\x02扇åŒēåˇ˛éĒŒč¯ã€‚发įŽ°äē†%[1]dä¸Ē扇åŒēäŊįŊŽã€‚\x02输å…ĨčŋžæŽĨ到您įš„Yuga" + - "byte数捎åē“厉čŖ…įš„äŋĄæ¯īŧˆhttps://download.yugabyte.com/īŧ‰\x02ä¸ģæœēīŧš%[1]s\x02įĢ¯åŖīŧš%[1]s\x02" + - "į”¨æˆˇåīŧš%[1]s\x02密į īŧš%[1]s\x02数捎åē“īŧš%[1]s\x02įģ§įģ­čŋžæŽĨ和更新æžļ构。\x04\x00\x01 3\x02发į”Ÿæ•°æŽ" + - "åē“配įŊŽé”™č¯¯īŧŒæ”žåŧƒčŋį§ģīŧš%[1]s\x02输å…ĨYugabyte数捎åē“ä¸ģæœēīŧˆSīŧ‰\x02æœĒ提䞛ä¸ģæœē\x02输å…ĨYugabyte数捎åē“ %[1]s" + - "\x02æœĒ提䞛å€ŧ\x02čŋžæŽĨ到Yugabyte数捎åē“æ—ļå‡ē错īŧš%[1]s\x02åˇ˛čŋžæŽĨ到Yugabyteã€‚æ¨Ąåŧæ˜¯åŊ“前įš„。\x02įŧ–į config." + - "tomlæ—ļå‡ē错īŧš%[1]s\x02按回čŊĻ更新%[1]säģĨčŽˇå–YugabyteäŋĄæ¯ã€‚įŽ°åœ¨å¤‡äģŊ文äģļ。\x02č¯ģ取config.toml文äģļæ¨Ąåŧæ—ļå‡ē错" + - "īŧš%[1]s\x02写å…Ĩconfig.tomlæ—ļå‡ē错īŧš%[1]s\x04\x00\x01 \x1b\x02重新启动Lotus Miner。" + - "\x02åˇ˛čŋžæŽĨ到Yugabyte\x02åŧ€å§‹äš‹å‰īŧŒč¯ˇįĄŽäŋæ‚¨įš„密封įŽĄé“åˇ˛æŽ’įŠēåšļå…ŗ闭lotus-miner。\x02选拊您įš„lotus-miner配" + - "įŊŽį›ŽåŊ•įš„äŊįŊŽīŧŸ\x02å…ļäģ–\x02输å…Ĩ%[1]säŊŋį”¨įš„配įŊŽį›ŽåŊ•įš„čˇ¯åž„\x04\x00\x01 \x1f\x02æœĒæäž›čˇ¯åž„īŧŒæ”žåŧƒčŋį§ģ\x02无" + - "æŗ•č¯ģ取提䞛įš„į›ŽåŊ•ä¸­įš„config.toml文äģļīŧŒé”™č¯¯īŧš%[1]s\x02č¯ģ取įŸŋåˇĨ配įŊŽ\x04\x00\x01\x0a\x15\x02æ­ĨéĒ¤åŽŒæˆ" + - "īŧš%[1]s\x02配įŊŽ'base'åˇ˛æ›´æ–°īŧŒåŒ…åĢäē†čŋ™ä¸ĒįŸŋåˇĨįš„地址和å…ļé’ąåŒ…čŽžįŊŽã€‚\x02æ¯”čžƒé…įŊŽ%[1]s和%[2]s。įŸŋåˇĨID之间除äē†é’ąåŒ…地" + - "址įš„变化åē”č¯Ĩ是需čĻįš„čŋčĄŒč€…įš„一ä¸Ē新įš„、最小įš„åą‚ã€‚\x02配įŊŽ'base'åˇ˛åˆ›åģēīŧŒåŒ…æ‹Ŧäē†čŋ™ä¸ĒįŸŋåˇĨįš„地址和å…ļé’ąåŒ…čŽžįŊŽã€‚\x04\x00\x01 " + - "\x15\x02åą‚%[1]såˇ˛åˆ›åģē。\x02čŋčĄŒCurioīŧšäŊŋį”¨æœē器或cgroup隔įĻģīŧŒäŊŋį”¨å‘Ŋäģ¤īŧˆé™„å¸Ļį¤ēäž‹åą‚é€‰æ‹Šīŧ‰īŧš" - - // Total table size 12286 bytes (11KiB); checksum: 15B16994 diff --git a/cmd/curio/internal/translations/knowns/main.go b/cmd/curio/internal/translations/knowns/main.go deleted file mode 100644 index a30a940657e..00000000000 --- a/cmd/curio/internal/translations/knowns/main.go +++ /dev/null @@ -1,82 +0,0 @@ -package main - -import ( - "bytes" - "encoding/json" - "fmt" - "os" - "path" - - "github.com/samber/lo" -) - -func main() { - for _, arg := range os.Args { - handleKnowns(arg) - } -} - -func handleKnowns(pathStart string) { - outpath := path.Join(pathStart, "out.gotext.json") - b, err := os.ReadFile(outpath) - if err != nil { - fmt.Println("cannot open "+outpath+":", err) - return - } - type TMsg struct { - ID string `json:"id"` - Translation string `json:"translation"` - Message string `json:"message"` - Placeholder json.RawMessage `json:"placeholder"` - } - type Dataformat struct { - Language string `json:"language"` - Messages []TMsg `json:"messages"` - } - var outData Dataformat - err = json.NewDecoder(bytes.NewBuffer(b)).Decode(&outData) - if err != nil { - fmt.Println("cannot decode "+outpath+":", err) - return - } - - f, err := os.Open(path.Join(pathStart, "messages.gotext.json")) - if err != nil { - fmt.Println("cannot open "+path.Join(pathStart, "messages.gotext.json")+":", err) - return - } - defer func() { _ = f.Close() }() - - var msgData Dataformat - err = json.NewDecoder(f).Decode(&msgData) - if err != nil { - fmt.Println("cannot decode "+path.Join(pathStart, "messages.gotext.json")+":", err) - return - } - - knowns := map[string]string{} - for _, msg := range msgData.Messages { - knowns[msg.ID] = msg.Translation - } - - toTranslate := lo.Filter(outData.Messages, func(msg TMsg, _ int) bool { - _, ok := knowns[msg.ID] - return !ok - }) - - outData.Messages = toTranslate // drop the "done" messages - var outJSON bytes.Buffer - enc := json.NewEncoder(&outJSON) - enc.SetIndent(" ", " ") - err = enc.Encode(outData) - if err != nil { - fmt.Println("cannot encode "+outpath+":", err) - return - } - err = os.WriteFile(outpath, outJSON.Bytes(), 0644) - if err != nil { - fmt.Println("cannot write "+outpath+":", err) - return - } - fmt.Println("rearranged successfully") -} diff --git a/cmd/curio/internal/translations/locales/en/out.gotext.json b/cmd/curio/internal/translations/locales/en/out.gotext.json deleted file mode 100644 index 1cd3957d4ca..00000000000 --- a/cmd/curio/internal/translations/locales/en/out.gotext.json +++ /dev/null @@ -1,1104 +0,0 @@ -{ - "language": "en", - "messages": [ - { - "id": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "message": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "translation": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "message": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "translation": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Use the arrow keys to navigate: ↓ ↑ → ←", - "message": "Use the arrow keys to navigate: ↓ ↑ → ←", - "translation": "Use the arrow keys to navigate: ↓ ↑ → ←", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Ctrl+C pressed in Terminal", - "message": "Ctrl+C pressed in Terminal", - "translation": "Ctrl+C pressed in Terminal", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Lotus-Miner to Curio Migration.", - "message": "Lotus-Miner to Curio Migration.", - "translation": "Lotus-Miner to Curio Migration.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Try the web interface with {__layersgui} for further guided improvements.", - "message": "Try the web interface with {__layersgui} for further guided improvements.", - "translation": "Try the web interface with {__layersgui} for further guided improvements.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "__layersgui", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"--layers=gui\"" - } - ], - "fuzzy": true - }, - { - "id": "You can now migrate your market node ({Boost}), if applicable.", - "message": "You can now migrate your market node ({Boost}), if applicable.", - "translation": "You can now migrate your market node ({Boost}), if applicable.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Boost", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"Boost\"" - } - ], - "fuzzy": true - }, - { - "id": "Migrating config.toml to database.", - "message": "Migrating config.toml to database.", - "translation": "Migrating config.toml to database.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Error reading from database: {Error}. Aborting Migration.", - "message": "Error reading from database: {Error}. Aborting Migration.", - "translation": "Error reading from database: {Error}. Aborting Migration.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error connecting to lotus node: {Error} {Error_1}", - "message": "Error connecting to lotus node: {Error} {Error_1}", - "translation": "Error connecting to lotus node: {Error} {Error_1}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - }, - { - "id": "Error_1", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "err2.Error()" - } - ], - "fuzzy": true - }, - { - "id": "could not get API info for FullNode: {Err}", - "message": "could not get API info for FullNode: {Err}", - "translation": "could not get API info for FullNode: {Err}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Err", - "string": "%[1]w", - "type": "error", - "underlyingType": "interface{Error() string}", - "argNum": 1, - "expr": "err" - } - ], - "fuzzy": true - }, - { - "id": "Error getting token: {Error}", - "message": "Error getting token: {Error}", - "translation": "Error getting token: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error saving config to layer: {Error}. Aborting Migration", - "message": "Error saving config to layer: {Error}. Aborting Migration", - "translation": "Error saving config to layer: {Error}. Aborting Migration", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "message": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "translation": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Select what you want to share with the Curio team.", - "message": "Select what you want to share with the Curio team.", - "translation": "Select what you want to share with the Curio team.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "message": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "translation": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Mainnet", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"mainnet\"" - }, - { - "id": "Testnet", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "\"testnet\"" - } - ], - "fuzzy": true - }, - { - "id": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "message": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "translation": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Hint: I am someone running Curio on net.", - "message": "Hint: I am someone running Curio on net.", - "translation": "Hint: I am someone running Curio on net.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Nothing.", - "message": "Nothing.", - "translation": "Nothing.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Aborting remaining steps.", - "message": "Aborting remaining steps.", - "translation": "Aborting remaining steps.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]v", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error getting miner power: {Error}", - "message": "Error getting miner power: {Error}", - "translation": "Error getting miner power: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error marshalling message: {Error}", - "message": "Error marshalling message: {Error}", - "translation": "Error marshalling message: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error getting miner info: {Error}", - "message": "Error getting miner info: {Error}", - "translation": "Error getting miner info: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error signing message: {Error}", - "message": "Error signing message: {Error}", - "translation": "Error signing message: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error sending message: {Error}", - "message": "Error sending message: {Error}", - "translation": "Error sending message: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error sending message: Status {Status}, Message:", - "message": "Error sending message: Status {Status}, Message:", - "translation": "Error sending message: Status {Status}, Message:", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Status", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "resp.Status" - }, - { - "id": "Stringb", - "string": "%[2]v", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "string(b)" - } - ], - "fuzzy": true - }, - { - "id": "Message sent.", - "message": "Message sent.", - "translation": "Message sent.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Documentation:", - "message": "Documentation:", - "translation": "Documentation:", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "message": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "translation": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Base", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"base\"" - }, - { - "id": "__layers", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "\"--layers\"" - } - ], - "fuzzy": true - }, - { - "id": "You can add other layers for per-machine configuration changes.", - "message": "You can add other layers for per-machine configuration changes.", - "translation": "You can add other layers for per-machine configuration changes.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "message": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "translation": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Slack", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"Slack\"" - }, - { - "id": "Fil_curio_help", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "\"#fil-curio-help\"" - }, - { - "id": "Fil_curio_dev", - "string": "%[3]s", - "type": "string", - "underlyingType": "string", - "argNum": 3, - "expr": "\"#fil-curio-dev\"" - } - ], - "fuzzy": true - }, - { - "id": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "message": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "translation": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Post", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"post\"" - } - ], - "fuzzy": true - }, - { - "id": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "message": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "translation": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Boost", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"Boost\"" - } - ], - "fuzzy": true - }, - { - "id": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "message": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "translation": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "message": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Lotus_miner", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"lotus-miner\"" - }, - { - "id": "Toml", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "\"config.toml\"" - } - ], - "fuzzy": true - }, - { - "id": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "message": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "translation": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Lotus_miner", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"lotus-miner\"" - } - ], - "fuzzy": true - }, - { - "id": "Error interpreting miner ID: {Error}: ID: {String}", - "message": "Error interpreting miner ID: {Error}: ID: {String}", - "translation": "Error interpreting miner ID: {Error}: ID: {String}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - }, - { - "id": "String", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "d.MinerID.String()" - } - ], - "fuzzy": true - }, - { - "id": "Error verifying sectors: {Error}", - "message": "Error verifying sectors: {Error}", - "translation": "Error verifying sectors: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "The sectors are in the database. The database is ready for {Curio}.", - "message": "The sectors are in the database. The database is ready for {Curio}.", - "translation": "The sectors are in the database. The database is ready for {Curio}.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Curio", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"Curio\"" - } - ], - "fuzzy": true - }, - { - "id": "Now shut down lotus-miner and move the systems to {Curio}.", - "message": "Now shut down lotus-miner and move the systems to {Curio}.", - "translation": "Now shut down lotus-miner and move the systems to {Curio}.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Curio", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"Curio\"" - } - ], - "fuzzy": true - }, - { - "id": "Press return to continue", - "message": "Press return to continue", - "translation": "Press return to continue", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Aborting migration.", - "message": "Aborting migration.", - "translation": "Aborting migration.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Sectors verified. {I} sector locations found.", - "message": "Sectors verified. {I} sector locations found.", - "translation": "Sectors verified. {I} sector locations found.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "I", - "string": "%[1]d", - "type": "[]int", - "underlyingType": "[]int", - "argNum": 1, - "expr": "i" - } - ], - "fuzzy": true - }, - { - "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "translation": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Host: {Hosts_}", - "message": "Host: {Hosts_}", - "translation": "Host: {Hosts_}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Hosts_", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "strings.Join(harmonyCfg.Hosts, \",\")" - } - ], - "fuzzy": true - }, - { - "id": "Port: {Port}", - "message": "Port: {Port}", - "translation": "Port: {Port}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Port", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonyCfg.Port" - } - ], - "fuzzy": true - }, - { - "id": "Username: {Username}", - "message": "Username: {Username}", - "translation": "Username: {Username}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Username", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonyCfg.Username" - } - ], - "fuzzy": true - }, - { - "id": "Password: {Password}", - "message": "Password: {Password}", - "translation": "Password: {Password}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Password", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonyCfg.Password" - } - ], - "fuzzy": true - }, - { - "id": "Database: {Database}", - "message": "Database: {Database}", - "translation": "Database: {Database}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Database", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonyCfg.Database" - } - ], - "fuzzy": true - }, - { - "id": "Continue to connect and update schema.", - "message": "Continue to connect and update schema.", - "translation": "Continue to connect and update schema.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Database config error occurred, abandoning migration: {Error}", - "message": "Database config error occurred, abandoning migration: {Error}", - "translation": "Database config error occurred, abandoning migration: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Enter the Yugabyte database host(s)", - "message": "Enter the Yugabyte database host(s)", - "translation": "Enter the Yugabyte database host(s)", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "No host provided", - "message": "No host provided", - "translation": "No host provided", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "translation": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Stringport_username_password_databasei_1", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" - } - ], - "fuzzy": true - }, - { - "id": "No value provided", - "message": "No value provided", - "translation": "No value provided", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Error connecting to Yugabyte database: {Error}", - "message": "Error connecting to Yugabyte database: {Error}", - "translation": "Error connecting to Yugabyte database: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Connected to Yugabyte. Schema is current.", - "message": "Connected to Yugabyte. Schema is current.", - "translation": "Connected to Yugabyte. Schema is current.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Enabling Sector Indexing in the database.", - "message": "Enabling Sector Indexing in the database.", - "translation": "Enabling Sector Indexing in the database.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Error encoding config.toml: {Error}", - "message": "Error encoding config.toml: {Error}", - "translation": "Error encoding config.toml: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "message": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "translation": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Toml", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"config.toml\"" - } - ], - "fuzzy": true - }, - { - "id": "Error expanding path: {Error}", - "message": "Error expanding path: {Error}", - "translation": "Error expanding path: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error reading filemode of config.toml: {Error}", - "message": "Error reading filemode of config.toml: {Error}", - "translation": "Error reading filemode of config.toml: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Error writing config.toml: {Error}", - "message": "Error writing config.toml: {Error}", - "translation": "Error writing config.toml: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Restart Lotus Miner.", - "message": "Restart Lotus Miner.", - "translation": "Restart Lotus Miner.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Connected to Yugabyte", - "message": "Connected to Yugabyte", - "translation": "Connected to Yugabyte", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "message": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "translation": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Select the location of your lotus-miner config directory?", - "message": "Select the location of your lotus-miner config directory?", - "translation": "Select the location of your lotus-miner config directory?", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Other", - "message": "Other", - "translation": "Other", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Enter the path to the configuration directory used by {Lotus_miner}", - "message": "Enter the path to the configuration directory used by {Lotus_miner}", - "translation": "Enter the path to the configuration directory used by {Lotus_miner}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Lotus_miner", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"lotus-miner\"" - } - ], - "fuzzy": true - }, - { - "id": "No path provided, abandoning migration", - "message": "No path provided, abandoning migration", - "translation": "No path provided, abandoning migration", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "translation": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Could not create repo from directory: {Error}. Aborting migration", - "message": "Could not create repo from directory: {Error}. Aborting migration", - "translation": "Could not create repo from directory: {Error}. Aborting migration", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "message": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "translation": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ], - "fuzzy": true - }, - { - "id": "Read Miner Config", - "message": "Read Miner Config", - "translation": "Read Miner Config", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Step Complete: {Step}", - "message": "Step Complete: {Step}", - "translation": "Step Complete: {Step}", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Step", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "step" - } - ], - "fuzzy": true - }, - { - "id": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "message": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "translation": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "message": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "translation": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "Base", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "\"base\"" - }, - { - "id": "MinerAddresses0", - "string": "%[2]s", - "type": "string", - "underlyingType": "string", - "argNum": 2, - "expr": "\"mig-\" + curioCfg.Addresses[0].MinerAddresses[0]" - } - ], - "fuzzy": true - }, - { - "id": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "message": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "translation": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "Layer {LayerName} created.", - "message": "Layer {LayerName} created.", - "translation": "Layer {LayerName} created.", - "translatorComment": "Copied from source.", - "placeholders": [ - { - "id": "LayerName", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "layerName" - } - ], - "fuzzy": true - }, - { - "id": "To work with the config:", - "message": "To work with the config:", - "translation": "To work with the config:", - "translatorComment": "Copied from source.", - "fuzzy": true - }, - { - "id": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "message": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "translation": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "translatorComment": "Copied from source.", - "fuzzy": true - } - ] -} \ No newline at end of file diff --git a/cmd/curio/internal/translations/locales/ko/messages.gotext.json b/cmd/curio/internal/translations/locales/ko/messages.gotext.json deleted file mode 100644 index ab0f8c6af60..00000000000 --- a/cmd/curio/internal/translations/locales/ko/messages.gotext.json +++ /dev/null @@ -1,704 +0,0 @@ -{ - "language": "ko", - "messages": [ - { - "id": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", - "translation": "ė´ 대화형 도ęĩŦ는 Curio 마ė´ęˇ¸ë ˆė´ė…˜ ęŗŧė •ė„ ė•ˆë‚´í•Šë‹ˆë‹¤.\nė–¸ė œë“ ė§€ ėĸ…ëŖŒí•˜ë ¤ëŠ´ Ctrl+CëĨŧ 누ëĨ´ė‹­ė‹œė˜¤." - }, - { - "id": "This tool confirms each action it does.", - "message": "This tool confirms each action it does.", - "translation": "ė´ 도ęĩŦ는 ėˆ˜í–‰í•˜ëŠ” 각 ėž‘ė—…ė„ 확ė¸í•Šë‹ˆë‹¤." - }, - { - "id": "Ctrl+C pressed in Terminal", - "message": "Ctrl+C pressed in Terminal", - "translation": "터미널ė—ė„œ Ctrl+C가 눌ëĻŧ" - }, - { - "id": "Verifying Sectors exist in Yugabyte.", - "message": "Verifying Sectors exist in Yugabyte.", - "translation": "Yugabyteė— ė„ší„°ę°€ ėĄ´ėžŦ하는ė§€ 확ė¸ ė¤‘." - }, - { - "id": "Error verifying sectors: {Error}", - "message": "Error verifying sectors: {Error}", - "translation": "ė„ší„° 확ė¸ ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Sectors verified. {I} sectors found.", - "message": "Sectors verified. {I} sectors found.", - "translation": "ė„ší„°ę°€ 확ė¸ë˜ė—ˆėŠĩ니다. {I}개ė˜ ė„ší„°ę°€ 발ę˛Ŧ되ė—ˆėŠĩ니다.", - "placeholders": [ - { - "id": "I", - "string": "%[1]d", - "type": "[]int", - "underlyingType": "[]int", - "argNum": 1, - "expr": "i" - } - ] - }, - { - "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "translation": "로터ėŠ¤ 마ė´ë„ˆė˜ config.tomlė—ė„œ 데ė´í„°ë˛ ė´ėŠ¤ ė •ëŗ´ëĨŧ ė œęą°í•˜ė§€ 마ė‹­ė‹œė˜¤. 두 번ė˜ PoStëĨŧ í”ŧ하기 ėœ„함ėž…니다." - }, - { - "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "translation": "Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ ė„¤ėš˜ė— ė—°ę˛°í•  ė •ëŗ´ëĨŧ ėž…ë Ĩ하ė‹­ė‹œė˜¤ (https://download.yugabyte.com/)" - }, - { - "id": "Host: {Hosts_}", - "message": "Host: {Hosts_}", - "translation": "호ėŠ¤íŠ¸: {Hosts_}", - "placeholders": [ - { - "id": "Hosts_", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "strings.Join(harmonycfg.Hosts, \",\")" - } - ] - }, - { - "id": "Port: {Port}", - "message": "Port: {Port}", - "translation": "íŦ트: {Port}", - "placeholders": [ - { - "id": "Port", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Port" - } - ] - }, - { - "id": "Username: {Username}", - "message": "Username: {Username}", - "translation": "ė‚ŦėšŠėž ė´ëĻ„: {Username}", - "placeholders": [ - { - "id": "Username", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Username" - } - ] - }, - { - "id": "Password: {Password}", - "message": "Password: {Password}", - "translation": "비밀번호: {Password}", - "placeholders": [ - { - "id": "Password", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Password" - } - ] - }, - { - "id": "Database: {Database}", - "message": "Database: {Database}", - "translation": "데ė´í„°ë˛ ė´ėŠ¤: {Database}", - "placeholders": [ - { - "id": "Database", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Database" - } - ] - }, - { - "id": "Continue to connect and update schema.", - "message": "Continue to connect and update schema.", - "translation": "ęŗ„ė† ė—°ę˛° 및 ėŠ¤í‚¤ë§ˆ ė—…데ė´íŠ¸." - }, - { - "id": "Database config error occurred, abandoning migration: {Error}", - "message": "Database config error occurred, abandoning migration: {Error}", - "translation": "데ė´í„°ë˛ ė´ėŠ¤ ęĩŦė„ą ė˜¤ëĨ˜ę°€ 발ėƒí•˜ė—Ŧ 마ė´ęˇ¸ë ˆė´ė…˜ė„ íŦ기합니다: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Enter the Yugabyte database host(s)", - "message": "Enter the Yugabyte database host(s)", - "translation": "Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ 호ėŠ¤íŠ¸ëĨŧ ėž…ë Ĩ하ė‹­ė‹œė˜¤" - }, - { - "id": "No host provided", - "message": "No host provided", - "translation": "호ėŠ¤íŠ¸ę°€ ė œęŗĩ되ė§€ ė•Šė•˜ėŠĩ니다" - }, - { - "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "translation": "Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ {Stringport_username_password_databasei_1}ė„ ėž…ë Ĩ하ė‹­ė‹œė˜¤", - "placeholders": [ - { - "id": "Stringport_username_password_databasei_1", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" - } - ] - }, - { - "id": "No value provided", - "message": "No value provided", - "translation": "값ė´ ė œęŗĩ되ė§€ ė•Šė•˜ėŠĩ니다" - }, - { - "id": "Error connecting to Yugabyte database: {Error}", - "message": "Error connecting to Yugabyte database: {Error}", - "translation": "Yugabyte 데ė´í„°ë˛ ė´ėŠ¤ė— ė—°ę˛°í•˜ëŠ” ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Connected to Yugabyte. Schema is current.", - "message": "Connected to Yugabyte. Schema is current.", - "translation": "Yugabyteė— ė—°ę˛°ë˜ė—ˆėŠĩ니다. ėŠ¤í‚¤ë§ˆę°€ 현ėžŦėž…니다." - }, - { - "id": "Error encoding config.toml: {Error}", - "message": "Error encoding config.toml: {Error}", - "translation": "config.tomlė„ ė¸ėŊ”딊하는 ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Error reading filemode of config.toml: {Error}", - "message": "Error reading filemode of config.toml: {Error}", - "translation": "config.tomlė˜ 파ėŧ ëĒ¨ë“œëĨŧ ėŊ는 ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Error writing config.toml: {Error}", - "message": "Error writing config.toml: {Error}", - "translation": "config.tomlė„ ė“°ëŠ” ė¤‘ ė˜¤ëĨ˜ę°€ 발ėƒí–ˆėŠĩ니다: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Restart Lotus Miner.", - "message": "Restart Lotus Miner.", - "translation": "로터ėŠ¤ 마ė´ë„ˆ ėžŦė‹œėž‘." - }, - { - "id": "Connected to Yugabyte", - "message": "Connected to Yugabyte", - "translation": "Yugabyteė— ė—°ę˛°ë¨" - }, - { - "id": "Select the location of your lotus-miner config directory?", - "message": "Select the location of your lotus-miner config directory?", - "translation": "로터ėŠ¤ 마ė´ë„ˆ ęĩŦė„ą 디렉토ëĻŦė˜ ėœ„ėš˜ëĨŧ ė„ íƒí•˜ė‹œę˛ ėŠĩ니까?" - }, - { - "id": "Other", - "message": "Other", - "translation": "기타" - }, - { - "id": "Enter the path to the configuration directory used by lotus-miner", - "message": "Enter the path to the configuration directory used by lotus-miner", - "translation": "로터ėŠ¤ 마ė´ë„ˆė—ė„œ ė‚ŦėšŠí•˜ëŠ” ęĩŦė„ą 디렉토ëĻŦė˜ ę˛Ŋ로ëĨŧ ėž…ë Ĩ하ė‹­ė‹œė˜¤" - }, - { - "id": "No path provided, abandoning migration", - "message": "No path provided, abandoning migration", - "translation": "ę˛Ŋ로가 ė œęŗĩ되ė§€ ė•Šė•˜ėœŧë¯€ëĄœ 마ė´ęˇ¸ë ˆė´ė…˜ė„ íŦ기합니다" - }, - { - "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "translation": "ė œęŗĩ된 디렉토ëĻŦė—ė„œ config.toml 파ėŧė„ ėŊė„ ėˆ˜ ė—†ėŠĩ니다. ė˜¤ëĨ˜: {Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Read Miner Config", - "message": "Read Miner Config", - "translation": "마ė´ë„ˆ ęĩŦė„ą ėŊ기" - }, - { - "id": "Completed Step: {Step}", - "message": "Completed Step: {Step}", - "translation": "단ęŗ„ ė™„ëŖŒ: {Step}", - "placeholders": [ - { - "id": "Step", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "step" - } - ] - }, - { - "id": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "translation": "ė´ 대화형 도ęĩŦ는 5ëļ„ ė•ˆė— lotus-minerëĨŧ Curio로 ė´ėŖŧ합니다.", - "message": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "placeholder": null - }, - { - "id": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "translation": "각 단ęŗ„는 확ė¸ė´ 필ėš”하늰 되돌ëĻ´ ėˆ˜ ėžˆėŠĩ니다. ė–¸ė œë“ ė§€ Ctrl+CëĨŧ 눌ëŸŦ ėĸ…ëŖŒí•  ėˆ˜ ėžˆėŠĩ니다.", - "message": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "placeholder": null - }, - { - "id": "Use the arrow keys to navigate: ↓ ↑ → ←", - "translation": "화ė‚´í‘œ 키ëĨŧ ė‚ŦėšŠí•˜ė—Ŧ ė´ë™í•˜ė„¸ėš”: ↓ ↑ → ←", - "message": "Use the arrow keys to navigate: ↓ ↑ → ←", - "placeholder": null - }, - { - "id": "Lotus-Miner to Curio Migration.", - "translation": "Lotus-Minerė—ė„œ Curio로 ė´ėŖŧ.", - "message": "Lotus-Miner to Curio Migration.", - "placeholder": null - }, - { - "id": "Try the web interface with for further guided improvements.", - "translation": "더 나ė€ ė•ˆë‚´ëĨŧ ėœ„í•´ ė›š ė¸í„°íŽ˜ė´ėŠ¤ëĨŧ ė‚ŦėšŠí•´ëŗ´ė„¸ėš”.", - "message": "Try the web interface with for further guided improvements.", - "placeholder": null - }, - { - "id": "You can now migrate your market node ({Boost}), if applicable.", - "translation": "해당하는 ę˛Ŋėš° ė´ė œ ė‹œėžĨ 노드ëĨŧ ė´ėŖŧ할 ėˆ˜ ėžˆėŠĩ니다 ({Boost}).", - "message": "You can now migrate your market node ({Boost}), if applicable.", - "placeholder": null - }, - { - "id": "Migrating config.toml to database.", - "translation": "config.tomlė„ 데ė´í„°ë˛ ė´ėŠ¤ëĄœ ė´ėŖŧ ė¤‘ėž…니다.", - "message": "Migrating config.toml to database.", - "placeholder": null - }, - { - "id": "Error reading from database: {Error}. Aborting Migration.", - "translation": "데ė´í„°ë˛ ė´ėŠ¤ė—ė„œ ėŊ는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}. 마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘단.", - "message": "Error reading from database: {Error}. Aborting Migration.", - "placeholder": null - }, - { - "id": "cannot read API: {Error}. Aborting Migration", - "translation": "APIëĨŧ ėŊė„ ėˆ˜ ė—†ėŠĩ니다: {Error}. 마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘단", - "message": "cannot read API: {Error}. Aborting Migration", - "placeholder": null - }, - { - "id": "Error saving config to layer: {Error}. Aborting Migration", - "translation": "레ė´ė–´ė— ęĩŦė„ąė„ ė €ėžĨ하는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}. 마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘단", - "message": "Error saving config to layer: {Error}. Aborting Migration", - "placeholder": null - }, - { - "id": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "translation": "Protocol Labs는 당ė‹ ė´ ė‚ŦėšŠí•˜ëŠ” ė†Œí”„트ė›¨ė–´ëĨŧ 개ė„ í•˜ęŗ  ė‹ļė–´í•Šë‹ˆë‹¤. CurioëĨŧ ė‚ŦėšŠ ė¤‘ė´ëŧęŗ  팀ė— ė•Œë ¤ėŖŧė„¸ėš”.", - "message": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "placeholder": null - }, - { - "id": "Select what you want to share with the Curio team.", - "translation": "Curio 팀ęŗŧ ęŗĩėœ í•˜ęŗ  ė‹ļė€ 것ė„ ė„ íƒí•˜ė„¸ėš”.", - "message": "Select what you want to share with the Curio team.", - "placeholder": null - }, - { - "id": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "translation": "개ëŗ„ 데ė´í„°: 마ė´ë„ˆ ID, Curio 버ė „, 네트ė›ŒíŦ ({Mainnet} 또는 {Testnet}). ė„œëĒ…됨.", - "message": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "placeholder": null - }, - { - "id": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "translation": "ė§‘ęŗ„-ėĩëĒ…: 버ė „, 네트ė›ŒíŦ, ꡸ëĻŦęŗ  마ė´ë„ˆ 파ė›Œ (버킷).", - "message": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "placeholder": null - }, - { - "id": "Hint: I am someone running Curio on net.", - "translation": "힌트: 네트ė›ŒíŦė—ė„œ CurioëĨŧ ė‹¤í–‰ ė¤‘ė¸ ė‚Ŧ람ėž…니다.", - "message": "Hint: I am someone running Curio on net.", - "placeholder": null - }, - { - "id": "Nothing.", - "translation": "ė•„ëŦ´ę˛ƒë„ ė—†ėŠĩ니다.", - "message": "Nothing.", - "placeholder": null - }, - { - "id": "Aborting remaining steps.", - "translation": "나머ė§€ 단ęŗ„ëĨŧ ė¤‘단핊니다.", - "message": "Aborting remaining steps.", - "placeholder": null - }, - { - "id": "Error connecting to lotus node: {Error}", - "translation": "로터ėŠ¤ 노드ė— ė—°ę˛°í•˜ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error connecting to lotus node: {Error}", - "placeholder": null - }, - { - "id": "Error getting miner power: {Error}", - "translation": "마ė´ë„ˆ 파ė›ŒëĨŧ 가ė ¸ė˜¤ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error getting miner power: {Error}", - "placeholder": null - }, - { - "id": "Error marshalling message: {Error}", - "translation": "메ė‹œė§€ëĨŧ 마ėƒŦ하는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error marshalling message: {Error}", - "placeholder": null - }, - { - "id": "Error getting miner info: {Error}", - "translation": "마ė´ë„ˆ ė •ëŗ´ëĨŧ 가ė ¸ė˜¤ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error getting miner info: {Error}", - "placeholder": null - }, - { - "id": "Error signing message: {Error}", - "translation": "메ė‹œė§€ ė„œëĒ… ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error signing message: {Error}", - "placeholder": null - }, - { - "id": "Error sending message: {Error}", - "translation": "메ė‹œė§€ ė „ė†Ą ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error sending message: {Error}", - "placeholder": null - }, - { - "id": "Error sending message: Status {Status}, Message:", - "translation": "메ė‹œė§€ ė „ė†Ą ė¤‘ ė˜¤ëĨ˜ 발ėƒ: ėƒíƒœ {Status}, 메ė‹œė§€:", - "message": "Error sending message: Status {Status}, Message:", - "placeholder": null - }, - { - "id": "Message sent.", - "translation": "메ė‹œė§€ę°€ ė „ė†Ąë˜ė—ˆėŠĩ니다.", - "message": "Message sent.", - "placeholder": null - }, - { - "id": "Documentation:", - "translation": "ëŦ¸ė„œ:", - "message": "Documentation:", - "placeholder": null - }, - { - "id": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "translation": "'{Base}' 레ė´ė–´ė—ëŠ” ęŗĩí†ĩ ęĩŦė„ąė´ ė €ėžĨ됩니다. ëĒ¨ë“  Curio ė¸ėŠ¤í„´ėŠ¤ëŠ” {__layers} ė¸ėˆ˜ė— íŦ함ė‹œí‚Ŧ ėˆ˜ ėžˆėŠĩ니다.", - "message": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "placeholder": null - }, - { - "id": "You can add other layers for per-machine configuration changes.", - "translation": "기ęŗ„ëŗ„ ęĩŦė„ą ëŗ€ę˛Ŋė„ ėœ„í•´ 다ëĨ¸ 레ė´ė–´ëĨŧ ėļ”가할 ėˆ˜ ėžˆėŠĩ니다.", - "message": "You can add other layers for per-machine configuration changes.", - "placeholder": null - }, - { - "id": "Join {Fil_curio_help} in Filecoin {Slack} for help.", - "translation": "도ė›€ė„ ėœ„í•´ Filecoin {Slack}ė˜ {Fil_curio_help}ė— 가ėž…하ė„¸ėš”.", - "message": "Join {Fil_curio_help} in Filecoin {Slack} for help.", - "placeholder": null - }, - { - "id": "Join {Fil_curio_dev} in Filecoin {Slack} to follow development and feedback!", - "translation": "개발ęŗŧ í”ŧ드백ė„ 따ëĨ´ë ¤ëŠ´ Filecoin {Slack}ė˜ {Fil_curio_dev}ė— 가ėž…하ė„¸ėš”!", - "message": "Join {Fil_curio_dev} in Filecoin {Slack} to follow development and feedback!", - "placeholder": null - }, - { - "id": "Want PoST redundancy? Run many Curio instances with the '{Post}' layer.", - "translation": "PoST ė¤‘ëŗĩė„ąė´ 필ėš”하ė‹ ę°€ėš”? '{Post}' 레ė´ė–´ė™€ 함ęģ˜ ė—ŦëŸŦ Curio ė¸ėŠ¤í„´ėŠ¤ëĨŧ ė‹¤í–‰í•˜ė„¸ėš”.", - "message": "Want PoST redundancy? Run many Curio instances with the '{Post}' layer.", - "placeholder": null - }, - { - "id": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "translation": "브ëŧėš°ė €ëĨŧ ė›š GUI로 ė´ë™í•˜ė—Ŧ {Boost} 및 ęŗ ę¸‰ 기ëŠĨėœŧ로 ė„¤ė •ė„ ė™„ëŖŒí•˜ė„¸ėš”.", - "message": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "placeholder": null - }, - { - "id": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", - "translation": "ė—ŦëŸŦ 마ė´ë„ˆ ID가 ėžˆëŠ” SPė˜ ę˛Ŋėš° 각 lotus-miner당 1회 마ė´ęˇ¸ë ˆė´ė…˜ė„ 동ėŧ한 1개ė˜ 데ė´í„°ë˛ ė´ėŠ¤ëĄœ ëĒ¨ë‘ ė‹¤í–‰í•˜ė„¸ėš”. 클ëŸŦėŠ¤í„°ëŠ” ëĒ¨ë“  마ė´ë„ˆ IDëĨŧ ė œęŗĩ합니다.", - "message": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", - "placeholder": null - }, - { - "id": "Please start {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "데ė´í„°ë˛ ė´ėŠ¤ ėžę˛Š ėĻëĒ…ė´ {Toml}ė— ėžˆėœŧë¯€ëĄœ ė´ė œ {Lotus_miner}ëĨŧ ė‹œėž‘하ė„¸ėš”.", - "message": "Please start {Lotus_miner} now that database credentials are in {Toml}.", - "placeholder": null - }, - { - "id": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "translation": "{Lotus_miner}가 Yugabyteė— ė„ší„°ëĨŧ 기록하도록 대기 ė¤‘ėž…니다.", - "message": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "placeholder": null - }, - { - "id": "The sectors are in the database. The database is ready for {Curio}.", - "translation": "ė„ší„°ę°€ 데ė´í„°ë˛ ė´ėŠ¤ė— ėžˆėŠĩ니다. 데ė´í„°ë˛ ė´ėŠ¤ę°€ {Curio}ëĨŧ ėœ„í•´ ė¤€ëš„되ė—ˆėŠĩ니다.", - "message": "The sectors are in the database. The database is ready for {Curio}.", - "placeholder": null - }, - { - "id": "Now shut down lotus-miner and move the systems to {Curio}.", - "translation": "ė´ė œ lotus-minerëĨŧ ėĸ…ëŖŒí•˜ęŗ  ė‹œėŠ¤í…œė„ {Curio}로 ė´ë™í•˜ė„¸ėš”.", - "message": "Now shut down lotus-miner and move the systems to {Curio}.", - "placeholder": null - }, - { - "id": "Press return to continue", - "translation": "ęŗ„ė†í•˜ë ¤ëŠ´ ëĻŦ턴ė„ 누ëĨ´ė„¸ėš”", - "message": "Press return to continue", - "placeholder": null - }, - { - "id": "Aborting migration.", - "translation": "마ė´ęˇ¸ë ˆė´ė…˜ ė¤‘단.", - "message": "Aborting migration.", - "placeholder": null - }, - { - "id": "Sectors verified. {I} sector locations found.", - "translation": "ė„ší„°ę°€ 확ė¸ë˜ė—ˆėŠĩ니다. {I}개ė˜ ė„ší„° ėœ„ėš˜ëĨŧ ė°žė•˜ėŠĩ니다.", - "message": "Sectors verified. {I} sector locations found.", - "placeholder": null - }, - { - "id": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "translation": "{Toml}ė„ Yugabyte ė •ëŗ´ëĄœ ė—…데ė´íŠ¸í•˜ë ¤ëŠ´ ëĻŦ턴ė„ 누ëĨ´ė„¸ėš”. ė§€ę¸ˆ 파ėŧė„ ë°ąė—…하ė„¸ėš”.", - "message": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "placeholder": null - }, - { - "id": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "translation": "ė‹œėž‘하려늴 밀봉 파ė´í”„ëŧė¸ė´ 비ė–´ ėžˆęŗ  lotus-miner가 ėĸ…ëŖŒë˜ė—ˆëŠ”ė§€ 확ė¸í•˜ė„¸ėš”.", - "message": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "placeholder": null - }, - { - "id": "Enter the path to the configuration directory used by {Lotus_miner}", - "translation": "{Lotus_miner}ė—ė„œ ė‚ŦėšŠí•˜ëŠ” ęĩŦė„ą 디렉터ëĻŦ ę˛Ŋ로ëĨŧ ėž…ë Ĩ하ė„¸ėš”.", - "message": "Enter the path to the configuration directory used by {Lotus_miner}", - "placeholder": null - }, - { - "id": "Step Complete: {Step}", - "translation": "단ęŗ„ ė™„ëŖŒ: {Step}", - "message": "Step Complete: {Step}", - "placeholder": null - }, - { - "id": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "translation": "ė´ 마ė´ë„ˆė˜ ėŖŧė†Œė™€ ė§€ę°‘ ė„¤ė •ė„ íŦ함하도록 ęĩŦė„ą 'base'가 ė—…데ė´íŠ¸ë˜ė—ˆėŠĩ니다.", - "message": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "placeholder": null - }, - { - "id": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "translation": "ęĩŦė„ą {Base}ëĨŧ {MinerAddresses0}ęŗŧ 비ęĩí•˜ė„¸ėš”. ė§€ę°‘ ėŖŧė†Œ ė´ė™¸ė˜ 마ė´ë„ˆ ID ė‚Ŧė´ė˜ ëŗ€ę˛Ŋ ė‚Ŧ항ė€ 필ėš”í•œ ė‹¤í–‰ėžëĨŧ ėœ„í•œ ėƒˆëĄœėš´ ėĩœė†Œí•œė˜ 레ė´ė–´ė—Ŧė•ŧ 합니다.", - "message": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "placeholder": null - }, - { - "id": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "translation": "ė´ 마ė´ë„ˆė˜ ėŖŧė†Œė™€ ė§€ę°‘ ė„¤ė •ė„ íŦ함하도록 ęĩŦė„ą 'base'가 ėƒė„ąë˜ė—ˆėŠĩ니다.", - "message": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "placeholder": null - }, - { - "id": "Layer {LayerName} created.", - "translation": "레ė´ė–´ {LayerName}가 ėƒė„ąë˜ė—ˆėŠĩ니다.", - "message": "Layer {LayerName} created.", - "placeholder": null - }, - { - "id": "To work with the config: \\n", - "translation": "ęĩŦė„ąė„ ė‚ŦėšŠí•˜ë ¤ëŠ´: \\n", - "message": "To work with the config: \\n", - "placeholder": null - }, - { - "id": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "translation": "CurioëĨŧ ė‹¤í–‰í•˜ë ¤ëŠ´: 기ęŗ„ 또는 cgroup 겊ëĻŦëĨŧ ė‚ŦėšŠí•˜ė—Ŧ 다ėŒ ëĒ…ë šė„ ė‚ŦėšŠí•˜ė„¸ėš” (ė˜ˆė œ 레ė´ė–´ ė„ íƒęŗŧ 함ęģ˜):", - "message": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "placeholder": null - }, - { - "id": "Try the web interface with {__layersgui} for further guided improvements.", - "translation": "더 많ė€ ė•ˆë‚´ëĨŧ ėœ„í•´ {__layersgui}ëĨŧ ė‚ŦėšŠí•˜ė—Ŧ ė›š ė¸í„°íŽ˜ė´ėŠ¤ëĨŧ ė‹œë„하ė„¸ėš”.", - "message": "Try the web interface with {__layersgui} for further guided improvements.", - "placeholder": null - }, - { - "id": "Error connecting to lotus node: {Error} {Error_1}", - "translation": "lotus 노드ė— ė—°ę˛°í•˜ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error} {Error_1}", - "message": "Error connecting to lotus node: {Error} {Error_1}", - "placeholder": null - }, - { - "id": "could not get API info for FullNode: {Err}", - "translation": "FullNodeė˜ API ė •ëŗ´ëĨŧ 가ė ¸ė˜Ŧ ėˆ˜ ė—†ėŠĩ니다: {Err}", - "message": "could not get API info for FullNode: {Err}", - "placeholder": null - }, - { - "id": "Error getting token: {Error}", - "translation": "토큰ė„ 가ė ¸ė˜¤ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error getting token: {Error}", - "placeholder": null - }, - { - "id": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "translation": "Filecoin {Slack} ėą„널: {Fil_curio_help} 및 {Fil_curio_dev}", - "message": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "placeholder": null - }, - { - "id": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "translation": "'{Post}' 레ė´ė–´ëĄœ ė—ŦëŸŦ Curio ė¸ėŠ¤í„´ėŠ¤ëĨŧ ė‹œėž‘하ė—Ŧ ė¤‘ëŗĩė„ąė„ 확ëŗ´í•˜ė„¸ėš”.", - "message": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "placeholder": null - }, - { - "id": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "translation": "한 개ė˜ 데ė´í„°ë˛ ė´ėŠ¤ëŠ” ė—ŦëŸŦ 광ëļ€ IDëĨŧ ė œęŗĩ할 ėˆ˜ ėžˆėŠĩ니다: 각 lotus-minerė— 대해 마ė´ęˇ¸ë ˆė´ė…˜ė„ ė‹¤í–‰í•˜ė„¸ėš”.", - "message": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "placeholder": null - }, - { - "id": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "데ė´í„°ë˛ ė´ėŠ¤ ėžę˛Š ėĻëĒ…ė´ {Toml}ė— ėž…ë Ĩ되ė—ˆėœŧë¯€ëĄœ ė§€ę¸ˆ {Lotus_miner}ė„ ė‹œėž‘í•˜ęą°ë‚˜ 다ė‹œ ė‹œėž‘하ė„¸ėš”.", - "message": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "placeholder": null - }, - { - "id": "Error interpreting miner ID: {Error}: ID: {String}", - "translation": "광ëļ€ IDëĨŧ 해ė„í•˜ëŠ” ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}: ID: {String}", - "message": "Error interpreting miner ID: {Error}: ID: {String}", - "placeholder": null - }, - { - "id": "Enabling Sector Indexing in the database.", - "translation": "데ė´í„°ë˛ ė´ėŠ¤ė—ė„œ Sector Indexingė„ 활ė„ąí™”핊니다.", - "message": "Enabling Sector Indexing in the database.", - "placeholder": null - }, - { - "id": "Error expanding path: {Error}", - "translation": "ę˛Ŋ로ëĨŧ 확ėžĨ하는 ė¤‘ ė˜¤ëĨ˜ 발ėƒ: {Error}", - "message": "Error expanding path: {Error}", - "placeholder": null - }, - { - "id": "Could not create repo from directory: {Error}. Aborting migration", - "translation": "디렉토ëĻŦė—ė„œ ė €ėžĨė†ŒëĨŧ ėƒė„ąí•  ėˆ˜ ė—†ėŠĩ니다: {Error}. 마ė´ęˇ¸ë ˆė´ė…˜ė„ ė¤‘단핊니다.", - "message": "Could not create repo from directory: {Error}. Aborting migration", - "placeholder": null - }, - { - "id": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "translation": "광ëļ€ ė €ėžĨė†ŒëĨŧ ėž ę¸ˆ 해ė œí•  ėˆ˜ ė—†ėŠĩ니다. 귀하ė˜ 광ëļ€ëĨŧ ė¤‘ė§€í•´ė•ŧ 합니다: {Error}\n 마ė´ęˇ¸ë ˆė´ė…˜ė„ ė¤‘단핊니다.", - "message": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "placeholder": null - }, - { - "id": "To work with the config:", - "translation": "ęĩŦė„ą 파ėŧė„ ė‚ŦėšŠí•˜ë ¤ëŠ´:", - "message": "To work with the config:", - "placeholder": null - } - ] -} \ No newline at end of file diff --git a/cmd/curio/internal/translations/locales/ko/out.gotext.json b/cmd/curio/internal/translations/locales/ko/out.gotext.json deleted file mode 100644 index 9eb8915c0a3..00000000000 --- a/cmd/curio/internal/translations/locales/ko/out.gotext.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "language": "ko", - "messages": [ - { - "id": "Try the web interface with {__layersgui} for further guided improvements.", - "translation": "", - "message": "Try the web interface with {__layersgui} for further guided improvements.", - "placeholder": null - }, - { - "id": "Error connecting to lotus node: {Error} {Error_1}", - "translation": "", - "message": "Error connecting to lotus node: {Error} {Error_1}", - "placeholder": null - }, - { - "id": "could not get API info for FullNode: {Err}", - "translation": "", - "message": "could not get API info for FullNode: {Err}", - "placeholder": null - }, - { - "id": "Error getting token: {Error}", - "translation": "", - "message": "Error getting token: {Error}", - "placeholder": null - }, - { - "id": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "translation": "", - "message": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "placeholder": null - }, - { - "id": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "translation": "", - "message": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "placeholder": null - }, - { - "id": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "translation": "", - "message": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "placeholder": null - }, - { - "id": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "", - "message": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "placeholder": null - }, - { - "id": "Error interpreting miner ID: {Error}: ID: {String}", - "translation": "", - "message": "Error interpreting miner ID: {Error}: ID: {String}", - "placeholder": null - }, - { - "id": "Enabling Sector Indexing in the database.", - "translation": "", - "message": "Enabling Sector Indexing in the database.", - "placeholder": null - }, - { - "id": "Error expanding path: {Error}", - "translation": "", - "message": "Error expanding path: {Error}", - "placeholder": null - }, - { - "id": "Could not create repo from directory: {Error}. Aborting migration", - "translation": "", - "message": "Could not create repo from directory: {Error}. Aborting migration", - "placeholder": null - }, - { - "id": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "translation": "", - "message": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "placeholder": null - }, - { - "id": "To work with the config:", - "translation": "", - "message": "To work with the config:", - "placeholder": null - } - ] - } diff --git a/cmd/curio/internal/translations/locales/zh/messages.gotext.json b/cmd/curio/internal/translations/locales/zh/messages.gotext.json deleted file mode 100644 index ffb5f3bdeab..00000000000 --- a/cmd/curio/internal/translations/locales/zh/messages.gotext.json +++ /dev/null @@ -1,704 +0,0 @@ -{ - "language": "zh", - "messages": [ - { - "id": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", - "message": "This interactive tool will walk you through migration of Curio.\nPress Ctrl+C to exit at any time.", - "translation": "æ­¤äē’动åˇĨå…ˇå°†åŧ•å¯ŧ您厌成Curioįš„čŋį§ģ。\n随æ—ļ按Ctrl+C退å‡ē。" - }, - { - "id": "This tool confirms each action it does.", - "message": "This tool confirms each action it does.", - "translation": "æ­¤åˇĨå…ˇįĄŽčŽ¤å…ļæ‰§čĄŒįš„每ä¸Ē操äŊœã€‚" - }, - { - "id": "Ctrl+C pressed in Terminal", - "message": "Ctrl+C pressed in Terminal", - "translation": "在įģˆįĢ¯ä¸­æŒ‰ä¸‹Ctrl+C" - }, - { - "id": "Verifying Sectors exist in Yugabyte.", - "message": "Verifying Sectors exist in Yugabyte.", - "translation": "æ­Ŗ在éĒŒč¯Yugabyte中įš„扇åŒē是åĻ存在。" - }, - { - "id": "Error verifying sectors: {Error}", - "message": "Error verifying sectors: {Error}", - "translation": "éĒŒč¯æ‰‡åŒēæ—ļå‡ē错īŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Sectors verified. {I} sectors found.", - "message": "Sectors verified. {I} sectors found.", - "translation": "åˇ˛éĒŒč¯æ‰‡åŒē。扞到äē†{I}ä¸Ē扇åŒē。", - "placeholders": [ - { - "id": "I", - "string": "%[1]d", - "type": "[]int", - "underlyingType": "[]int", - "argNum": 1, - "expr": "i" - } - ] - }, - { - "id": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "message": "Never remove the database info from the config.toml for lotus-miner as it avoids double PoSt.", - "translation": "äģŽconfig.toml中永čŋœä¸čĻåˆ é™¤lotus-minerįš„数捎åē“äŋĄæ¯īŧŒå› ä¸ē厃éŋ免äē†åŒPoSt。" - }, - { - "id": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "message": "Enter the info to connect to your Yugabyte database installation (https://download.yugabyte.com/)", - "translation": "输å…ĨčŋžæŽĨ到您įš„Yugabyte数捎åē“厉čŖ…įš„äŋĄæ¯īŧˆhttps://download.yugabyte.com/īŧ‰" - }, - { - "id": "Host: {Hosts_}", - "message": "Host: {Hosts_}", - "translation": "ä¸ģæœēīŧš{Hosts_}", - "placeholders": [ - { - "id": "Hosts_", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "strings.Join(harmonycfg.Hosts, \",\")" - } - ] - }, - { - "id": "Port: {Port}", - "message": "Port: {Port}", - "translation": "įĢ¯åŖīŧš{Port}", - "placeholders": [ - { - "id": "Port", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Port" - } - ] - }, - { - "id": "Username: {Username}", - "message": "Username: {Username}", - "translation": "į”¨æˆˇåīŧš{Username}", - "placeholders": [ - { - "id": "Username", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Username" - } - ] - }, - { - "id": "Password: {Password}", - "message": "Password: {Password}", - "translation": "密į īŧš{Password}", - "placeholders": [ - { - "id": "Password", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Password" - } - ] - }, - { - "id": "Database: {Database}", - "message": "Database: {Database}", - "translation": "数捎åē“īŧš{Database}", - "placeholders": [ - { - "id": "Database", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "harmonycfg.Database" - } - ] - }, - { - "id": "Continue to connect and update schema.", - "message": "Continue to connect and update schema.", - "translation": "įģ§įģ­čŋžæŽĨ和更新æžļ构。" - }, - { - "id": "Database config error occurred, abandoning migration: {Error}", - "message": "Database config error occurred, abandoning migration: {Error}", - "translation": "发į”Ÿæ•°æŽåē“配įŊŽé”™č¯¯īŧŒæ”žåŧƒčŋį§ģīŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Enter the Yugabyte database host(s)", - "message": "Enter the Yugabyte database host(s)", - "translation": "输å…ĨYugabyte数捎åē“ä¸ģæœēīŧˆSīŧ‰" - }, - { - "id": "No host provided", - "message": "No host provided", - "translation": "æœĒ提䞛ä¸ģæœē" - }, - { - "id": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "message": "Enter the Yugabyte database {Stringport_username_password_databasei_1}", - "translation": "输å…ĨYugabyte数捎åē“ {Stringport_username_password_databasei_1}", - "placeholders": [ - { - "id": "Stringport_username_password_databasei_1", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "[]string{\"port\", \"username\", \"password\", \"database\"}[i-1]" - } - ] - }, - { - "id": "No value provided", - "message": "No value provided", - "translation": "æœĒ提䞛å€ŧ" - }, - { - "id": "Error connecting to Yugabyte database: {Error}", - "message": "Error connecting to Yugabyte database: {Error}", - "translation": "čŋžæŽĨ到Yugabyte数捎åē“æ—ļå‡ē错īŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Connected to Yugabyte. Schema is current.", - "message": "Connected to Yugabyte. Schema is current.", - "translation": "åˇ˛čŋžæŽĨ到Yugabyteã€‚æ¨Ąåŧæ˜¯åŊ“前įš„。" - }, - { - "id": "Error encoding config.toml: {Error}", - "message": "Error encoding config.toml: {Error}", - "translation": "įŧ–į config.tomlæ—ļå‡ē错īŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Error reading filemode of config.toml: {Error}", - "message": "Error reading filemode of config.toml: {Error}", - "translation": "č¯ģ取config.toml文äģļæ¨Ąåŧæ—ļå‡ē错īŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Error writing config.toml: {Error}", - "message": "Error writing config.toml: {Error}", - "translation": "写å…Ĩconfig.tomlæ—ļå‡ē错īŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Restart Lotus Miner.", - "message": "Restart Lotus Miner.", - "translation": "重新启动Lotus Miner。" - }, - { - "id": "Connected to Yugabyte", - "message": "Connected to Yugabyte", - "translation": "åˇ˛čŋžæŽĨ到Yugabyte" - }, - { - "id": "Select the location of your lotus-miner config directory?", - "message": "Select the location of your lotus-miner config directory?", - "translation": "选拊您įš„lotus-miner配įŊŽį›ŽåŊ•įš„äŊįŊŽīŧŸ" - }, - { - "id": "Other", - "message": "Other", - "translation": "å…ļäģ–" - }, - { - "id": "Enter the path to the configuration directory used by lotus-miner", - "message": "Enter the path to the configuration directory used by lotus-miner", - "translation": "输å…Ĩlotus-mineräŊŋį”¨įš„配įŊŽį›ŽåŊ•įš„čˇ¯åž„" - }, - { - "id": "No path provided, abandoning migration", - "message": "No path provided, abandoning migration", - "translation": "æœĒæäž›čˇ¯åž„īŧŒæ”žåŧƒčŋį§ģ" - }, - { - "id": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "message": "Cannot read the config.toml file in the provided directory, Error: {Error}", - "translation": "无æŗ•č¯ģ取提䞛įš„į›ŽåŊ•ä¸­įš„config.toml文äģļīŧŒé”™č¯¯īŧš{Error}", - "placeholders": [ - { - "id": "Error", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "err.Error()" - } - ] - }, - { - "id": "Read Miner Config", - "message": "Read Miner Config", - "translation": "č¯ģ取įŸŋåˇĨ配įŊŽ" - }, - { - "id": "Completed Step: {Step}", - "message": "Completed Step: {Step}", - "translation": "厌成æ­ĨéĒ¤īŧš{Step}", - "placeholders": [ - { - "id": "Step", - "string": "%[1]s", - "type": "string", - "underlyingType": "string", - "argNum": 1, - "expr": "step" - } - ] - }, - { - "id": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "translation": "čŋ™ä¸Ēäē¤äē’åŧåˇĨå…ˇå¯äģĨ在5分钟内将lotus-minerčŋį§ģ到Curio。", - "message": "This interactive tool migrates lotus-miner to Curio in 5 minutes.", - "placeholder": null - }, - { - "id": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "translation": "每一æ­ĨéƒŊ需čĻæ‚¨įš„įĄŽčŽ¤īŧŒåšļ且可äģĨ撤销。随æ—ļ按Ctrl+C退å‡ē。", - "message": "Each step needs your confirmation and can be reversed. Press Ctrl+C to exit at any time.", - "placeholder": null - }, - { - "id": "Use the arrow keys to navigate: ↓ ↑ → ←", - "translation": "äŊŋį”¨įŽ­å¤´é”Žčŋ›čĄŒå¯ŧčˆĒīŧšâ†“ ↑ → ←", - "message": "Use the arrow keys to navigate: ↓ ↑ → ←", - "placeholder": null - }, - { - "id": "Lotus-Miner to Curio Migration.", - "translation": "Lotus-Miner到Curiočŋį§ģ。", - "message": "Lotus-Miner to Curio Migration.", - "placeholder": null - }, - { - "id": "Try the web interface with for further guided improvements.", - "translation": "å°č¯•äŊŋį”¨įŊ‘éĄĩį•Œéĸčŋ›čĄŒčŋ›ä¸€æ­Ĩįš„指å¯ŧ攚čŋ›ã€‚", - "message": "Try the web interface with for further guided improvements.", - "placeholder": null - }, - { - "id": "You can now migrate your market node ({Boost}), if applicable.", - "translation": "åĻ‚果适į”¨īŧŒæ‚¨įŽ°åœ¨å¯äģĨčŋį§ģ您įš„市åœē节į‚š({Boost})。", - "message": "You can now migrate your market node ({Boost}), if applicable.", - "placeholder": null - }, - { - "id": "Migrating config.toml to database.", - "translation": "æ­Ŗ在将config.tomlčŋį§ģ到数捎åē“。", - "message": "Migrating config.toml to database.", - "placeholder": null - }, - { - "id": "Error reading from database: {Error}. Aborting Migration.", - "translation": "č¯ģ取数捎åē“æ—ļå‡ē错īŧš{Error}。æ­Ŗ在中æ­ĸčŋį§ģ。", - "message": "Error reading from database: {Error}. Aborting Migration.", - "placeholder": null - }, - { - "id": "cannot read API: {Error}. Aborting Migration", - "translation": "无æŗ•č¯ģ取APIīŧš{Error}。æ­Ŗ在中æ­ĸčŋį§ģ", - "message": "cannot read API: {Error}. Aborting Migration", - "placeholder": null - }, - { - "id": "Error saving config to layer: {Error}. Aborting Migration", - "translation": "äŋå­˜é…įŊŽåˆ°åą‚æ—ļå‡ē错īŧš{Error}。æ­Ŗ在中æ­ĸčŋį§ģ", - "message": "Error saving config to layer: {Error}. Aborting Migration", - "placeholder": null - }, - { - "id": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "translation": "Protocol Labs希望攚čŋ›æ‚¨äŊŋį”¨įš„čŊ¯äģļã€‚å‘Šč¯‰å›ĸ队您æ­Ŗ在äŊŋį”¨Curio。", - "message": "Protocol Labs wants to improve the software you use. Tell the team you're using Curio.", - "placeholder": null - }, - { - "id": "Select what you want to share with the Curio team.", - "translation": "选拊您æƒŗ与Curioå›ĸ队分äēĢįš„内厚。", - "message": "Select what you want to share with the Curio team.", - "placeholder": null - }, - { - "id": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "translation": "ä¸Ēäēē数捎īŧšįŸŋåˇĨID、Curioį‰ˆæœŦ、įŊ‘įģœ({Mainnet}或{Testnet})ã€‚åˇ˛į­žåã€‚", - "message": "Individual Data: Miner ID, Curio version, net ({Mainnet} or {Testnet}). Signed.", - "placeholder": null - }, - { - "id": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "translation": "čšåˆ-åŒŋ名īŧšį‰ˆæœŦ、įŊ‘įģœå’ŒįŸŋåˇĨ功įŽ‡īŧˆåˆ†æĄļīŧ‰ã€‚", - "message": "Aggregate-Anonymous: version, net, and Miner power (bucketed).", - "placeholder": null - }, - { - "id": "Hint: I am someone running Curio on net.", - "translation": "提į¤ēīŧšæˆ‘是在įŊ‘įģœä¸ŠčŋčĄŒCurioįš„äēē。", - "message": "Hint: I am someone running Curio on net.", - "placeholder": null - }, - { - "id": "Nothing.", - "translation": "æ˛Ąæœ‰ã€‚", - "message": "Nothing.", - "placeholder": null - }, - { - "id": "Aborting remaining steps.", - "translation": "中æ­ĸ削äŊ™æ­ĨéĒ¤ã€‚", - "message": "Aborting remaining steps.", - "placeholder": null - }, - { - "id": "Error connecting to lotus node: {Error}", - "translation": "čŋžæŽĨåˆ°čŽ˛čŠąčŠ‚į‚šæ—ļå‡ē错īŧš{Error}", - "message": "Error connecting to lotus node: {Error}", - "placeholder": null - }, - { - "id": "Error getting miner power: {Error}", - "translation": "čŽˇå–įŸŋåˇĨ功įŽ‡æ—ļå‡ē错īŧš{Error}", - "message": "Error getting miner power: {Error}", - "placeholder": null - }, - { - "id": "Error marshalling message: {Error}", - "translation": "整į†æļˆæ¯æ—ļå‡ē错īŧš{Error}", - "message": "Error marshalling message: {Error}", - "placeholder": null - }, - { - "id": "Error getting miner info: {Error}", - "translation": "čŽˇå–įŸŋåˇĨäŋĄæ¯æ—ļå‡ē错īŧš{Error}", - "message": "Error getting miner info: {Error}", - "placeholder": null - }, - { - "id": "Error signing message: {Error}", - "translation": "į­žįŊ˛æļˆæ¯æ—ļå‡ē错īŧš{Error}", - "message": "Error signing message: {Error}", - "placeholder": null - }, - { - "id": "Error sending message: {Error}", - "translation": "发送æļˆæ¯æ—ļå‡ē错īŧš{Error}", - "message": "Error sending message: {Error}", - "placeholder": null - }, - { - "id": "Error sending message: Status {Status}, Message:", - "translation": "发送æļˆæ¯æ—ļå‡ē错īŧšįŠļ态{Status}īŧŒæļˆæ¯īŧš", - "message": "Error sending message: Status {Status}, Message:", - "placeholder": null - }, - { - "id": "Message sent.", - "translation": "æļˆæ¯åˇ˛å‘送。", - "message": "Message sent.", - "placeholder": null - }, - { - "id": "Documentation:", - "translation": "文æĄŖīŧš", - "message": "Documentation:", - "placeholder": null - }, - { - "id": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "translation": "'{Base}'åą‚å­˜å‚¨é€šį”¨é…įŊŽã€‚所有Curio厞䞋éƒŊ可äģĨ在å…ļ{__layers}参数中包åĢ厃。", - "message": "The '{Base}' layer stores common configuration. All curio instances can include it in their {__layers} argument.", - "placeholder": null - }, - { - "id": "You can add other layers for per-machine configuration changes.", - "translation": "您可äģĨæˇģ加å…ļäģ–åą‚čŋ›čĄŒæ¯å°æœē器įš„配įŊŽæ›´æ”šã€‚", - "message": "You can add other layers for per-machine configuration changes.", - "placeholder": null - }, - { - "id": "Join {Fil_curio_help} in Filecoin {Slack} for help.", - "translation": "加å…ĨFilecoin {Slack}中įš„{Fil_curio_help}å¯ģæą‚å¸ŽåŠŠã€‚", - "message": "Join {Fil_curio_help} in Filecoin {Slack} for help.", - "placeholder": null - }, - { - "id": "Join {Fil_curio_dev} in Filecoin {Slack} to follow development and feedback!", - "translation": "加å…ĨFilecoin {Slack}中įš„{Fil_curio_dev}æĨ跟č¸Ēåŧ€å‘和反éĻˆīŧ", - "message": "Join {Fil_curio_dev} in Filecoin {Slack} to follow development and feedback!", - "placeholder": null - }, - { - "id": "Want PoST redundancy? Run many Curio instances with the '{Post}' layer.", - "translation": "需čĻPoST冗äŊ™īŧŸäŊŋį”¨'{Post}'åą‚čŋčĄŒå¤šä¸ĒCurio厞䞋。", - "message": "Want PoST redundancy? Run many Curio instances with the '{Post}' layer.", - "placeholder": null - }, - { - "id": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "translation": "将您įš„æĩč§ˆå™¨æŒ‡å‘您įš„įŊ‘įģœGUIīŧŒäģĨäŊŋį”¨{Boost}和éĢ˜įē§åŠŸčƒŊåŽŒæˆčŽžįŊŽã€‚", - "message": "Point your browser to your web GUI to complete setup with {Boost} and advanced featues.", - "placeholder": null - }, - { - "id": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", - "translation": "寚äēŽå…ˇæœ‰å¤šä¸ĒįŸŋåˇĨIDįš„SPīŧŒé’ˆå¯šæ‰€æœ‰lotus-minerčŋčĄŒ1æŦĄčŋį§ģ到同一ä¸Ē数捎åē“。集įž¤å°†æœåŠĄæ‰€æœ‰įŸŋåˇĨID。", - "message": "For SPs with multiple Miner IDs, run 1 migration per lotus-miner all to the same 1 database. The cluster will serve all Miner IDs.", - "placeholder": null - }, - { - "id": "Please start {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "įŽ°åœ¨æ•°æŽåē“å‡­č¯åœ¨{Toml}中īŧŒč¯ˇå¯åŠ¨{Lotus_miner}。", - "message": "Please start {Lotus_miner} now that database credentials are in {Toml}.", - "placeholder": null - }, - { - "id": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "translation": "į­‰åž…{Lotus_miner}将扇åŒē写å…ĨYugabyte。", - "message": "Waiting for {Lotus_miner} to write sectors into Yugabyte.", - "placeholder": null - }, - { - "id": "The sectors are in the database. The database is ready for {Curio}.", - "translation": "扇åŒē在数捎åē“中。数捎åē“åˇ˛å‡†å¤‡åĨŊį”¨äēŽ{Curio}。", - "message": "The sectors are in the database. The database is ready for {Curio}.", - "placeholder": null - }, - { - "id": "Now shut down lotus-miner and move the systems to {Curio}.", - "translation": "įŽ°åœ¨å…ŗ闭lotus-mineråšļ将įŗģįģŸį§ģč‡ŗ{Curio}。", - "message": "Now shut down lotus-miner and move the systems to {Curio}.", - "placeholder": null - }, - { - "id": "Press return to continue", - "translation": "按回čŊĻįģ§įģ­", - "message": "Press return to continue", - "placeholder": null - }, - { - "id": "Aborting migration.", - "translation": "中æ­ĸčŋį§ģ。", - "message": "Aborting migration.", - "placeholder": null - }, - { - "id": "Sectors verified. {I} sector locations found.", - "translation": "扇åŒēåˇ˛éĒŒč¯ã€‚发įŽ°äē†{I}ä¸Ē扇åŒēäŊįŊŽã€‚", - "message": "Sectors verified. {I} sector locations found.", - "placeholder": null - }, - { - "id": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "translation": "按回čŊĻ更新{Toml}äģĨčŽˇå–YugabyteäŋĄæ¯ã€‚įŽ°åœ¨å¤‡äģŊ文äģļ。", - "message": "Press return to update {Toml} with Yugabyte info. Backup the file now.", - "placeholder": null - }, - { - "id": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "translation": "åŧ€å§‹äš‹å‰īŧŒč¯ˇįĄŽäŋæ‚¨įš„密封įŽĄé“åˇ˛æŽ’įŠēåšļå…ŗ闭lotus-miner。", - "message": "To start, ensure your sealing pipeline is drained and shut-down lotus-miner.", - "placeholder": null - }, - { - "id": "Enter the path to the configuration directory used by {Lotus_miner}", - "translation": "输å…Ĩ{Lotus_miner}äŊŋį”¨įš„配įŊŽį›ŽåŊ•įš„čˇ¯åž„", - "message": "Enter the path to the configuration directory used by {Lotus_miner}", - "placeholder": null - }, - { - "id": "Step Complete: {Step}", - "translation": "æ­ĨéĒ¤åŽŒæˆīŧš{Step}", - "message": "Step Complete: {Step}", - "placeholder": null - }, - { - "id": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "translation": "配įŊŽ'base'åˇ˛æ›´æ–°īŧŒåŒ…åĢäē†čŋ™ä¸ĒįŸŋåˇĨįš„地址和å…ļé’ąåŒ…čŽžįŊŽã€‚", - "message": "Configuration 'base' was updated to include this miner's address and its wallet setup.", - "placeholder": null - }, - { - "id": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "translation": "æ¯”čžƒé…įŊŽ{Base}和{MinerAddresses0}。įŸŋåˇĨID之间除äē†é’ąåŒ…地址įš„变化åē”č¯Ĩ是需čĻįš„čŋčĄŒč€…įš„一ä¸Ē新įš„、最小įš„åą‚ã€‚", - "message": "Compare the configurations {Base} to {MinerAddresses0}. Changes between the miner IDs other than wallet addreses should be a new, minimal layer for runners that need it.", - "placeholder": null - }, - { - "id": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "translation": "配įŊŽ'base'åˇ˛åˆ›åģēīŧŒåŒ…æ‹Ŧäē†čŋ™ä¸ĒįŸŋåˇĨįš„地址和å…ļé’ąåŒ…čŽžįŊŽã€‚", - "message": "Configuration 'base' was created to include this miner's address and its wallet setup.", - "placeholder": null - }, - { - "id": "Layer {LayerName} created.", - "translation": "åą‚{LayerName}åˇ˛åˆ›åģē。", - "message": "Layer {LayerName} created.", - "placeholder": null - }, - { - "id": "To work with the config: \\n", - "translation": "čĻäŊŋį”¨é…įŊŽīŧš\\n", - "message": "To work with the config: \\n", - "placeholder": null - }, - { - "id": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "translation": "čŋčĄŒCurioīŧšäŊŋį”¨æœē器或cgroup隔įĻģīŧŒäŊŋį”¨å‘Ŋäģ¤īŧˆé™„å¸Ļį¤ēäž‹åą‚é€‰æ‹Šīŧ‰īŧš", - "message": "To run Curio: With machine or cgroup isolation, use the command (with example layer selection):", - "placeholder": null - }, - { - "id": "Try the web interface with {__layersgui} for further guided improvements.", - "translation": "å°č¯•äŊŋį”¨{__layersgui}įš„Webį•Œéĸčŋ›čĄŒčŋ›ä¸€æ­Ĩåŧ•å¯ŧåŧæ”ščŋ›ã€‚", - "message": "Try the web interface with {__layersgui} for further guided improvements.", - "placeholder": null - }, - { - "id": "Error connecting to lotus node: {Error} {Error_1}", - "translation": "čŋžæŽĨ到lotus节į‚šæ—ļå‡ē错īŧš{Error} {Error_1}", - "message": "Error connecting to lotus node: {Error} {Error_1}", - "placeholder": null - }, - { - "id": "could not get API info for FullNode: {Err}", - "translation": "无æŗ•čŽˇå–FullNodeįš„APIäŋĄæ¯īŧš{Err}", - "message": "could not get API info for FullNode: {Err}", - "placeholder": null - }, - { - "id": "Error getting token: {Error}", - "translation": "čŽˇå–äģ¤į‰Œæ—ļå‡ē错īŧš{Error}", - "message": "Error getting token: {Error}", - "placeholder": null - }, - { - "id": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "translation": "Filecoin {Slack} éĸ‘道īŧš{Fil_curio_help} 和 {Fil_curio_dev}", - "message": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "placeholder": null - }, - { - "id": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "translation": "äŊŋį”¨'{Post}'åą‚å¯åŠ¨å¤šä¸ĒCurio厞䞋äģĨ厞įŽ°å†—äŊ™ã€‚", - "message": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "placeholder": null - }, - { - "id": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "translation": "一ä¸Ē数捎åē“可äģĨæœåŠĄå¤šä¸ĒįŸŋåˇĨIDīŧšä¸ē每ä¸Ēlotus-minerčŋčĄŒčŋį§ģ。", - "message": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "placeholder": null - }, - { - "id": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "č¯ˇįĢ‹åŗ启动īŧˆæˆ–重新启动īŧ‰{Lotus_miner}īŧŒå› ä¸ē数捎åē“å‡­æŽåˇ˛åœ¨{Toml}中。", - "message": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "placeholder": null - }, - { - "id": "Error interpreting miner ID: {Error}: ID: {String}", - "translation": "č§Ŗ释įŸŋåˇĨIDæ—ļå‡ē错īŧš{Error}īŧšIDīŧš{String}", - "message": "Error interpreting miner ID: {Error}: ID: {String}", - "placeholder": null - }, - { - "id": "Enabling Sector Indexing in the database.", - "translation": "在数捎åē“中启į”¨æ‰‡åŒēį´ĸåŧ•ã€‚", - "message": "Enabling Sector Indexing in the database.", - "placeholder": null - }, - { - "id": "Error expanding path: {Error}", - "translation": "æ‰Šåą•čˇ¯åž„æ—ļå‡ē错īŧš{Error}", - "message": "Error expanding path: {Error}", - "placeholder": null - }, - { - "id": "Could not create repo from directory: {Error}. Aborting migration", - "translation": "无æŗ•äģŽį›ŽåŊ•åˆ›åģērepoīŧš{Error}。 中æ­ĸčŋį§ģ", - "message": "Could not create repo from directory: {Error}. Aborting migration", - "placeholder": null - }, - { - "id": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "translation": "无æŗ•é”åŽšįŸŋåˇĨrepo。 您įš„įŸŋåˇĨåŋ…éĄģ停æ­ĸīŧš{Error}\n 中æ­ĸčŋį§ģ", - "message": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "placeholder": null - }, - { - "id": "To work with the config:", - "translation": "čĻäŊŋį”¨é…įŊŽīŧš", - "message": "To work with the config:", - "placeholder": null - } - ] -} \ No newline at end of file diff --git a/cmd/curio/internal/translations/locales/zh/out.gotext.json b/cmd/curio/internal/translations/locales/zh/out.gotext.json deleted file mode 100644 index 37ac5f9330a..00000000000 --- a/cmd/curio/internal/translations/locales/zh/out.gotext.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "language": "zh", - "messages": [ - { - "id": "Try the web interface with {__layersgui} for further guided improvements.", - "translation": "", - "message": "Try the web interface with {__layersgui} for further guided improvements.", - "placeholder": null - }, - { - "id": "Error connecting to lotus node: {Error} {Error_1}", - "translation": "", - "message": "Error connecting to lotus node: {Error} {Error_1}", - "placeholder": null - }, - { - "id": "could not get API info for FullNode: {Err}", - "translation": "", - "message": "could not get API info for FullNode: {Err}", - "placeholder": null - }, - { - "id": "Error getting token: {Error}", - "translation": "", - "message": "Error getting token: {Error}", - "placeholder": null - }, - { - "id": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "translation": "", - "message": "Filecoin {Slack} channels: {Fil_curio_help} and {Fil_curio_dev}", - "placeholder": null - }, - { - "id": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "translation": "", - "message": "Start multiple Curio instances with the '{Post}' layer to redundancy.", - "placeholder": null - }, - { - "id": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "translation": "", - "message": "One database can serve multiple miner IDs: Run a migration for each lotus-miner.", - "placeholder": null - }, - { - "id": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "translation": "", - "message": "Please start (or restart) {Lotus_miner} now that database credentials are in {Toml}.", - "placeholder": null - }, - { - "id": "Error interpreting miner ID: {Error}: ID: {String}", - "translation": "", - "message": "Error interpreting miner ID: {Error}: ID: {String}", - "placeholder": null - }, - { - "id": "Enabling Sector Indexing in the database.", - "translation": "", - "message": "Enabling Sector Indexing in the database.", - "placeholder": null - }, - { - "id": "Error expanding path: {Error}", - "translation": "", - "message": "Error expanding path: {Error}", - "placeholder": null - }, - { - "id": "Could not create repo from directory: {Error}. Aborting migration", - "translation": "", - "message": "Could not create repo from directory: {Error}. Aborting migration", - "placeholder": null - }, - { - "id": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "translation": "", - "message": "Could not lock miner repo. Your miner must be stopped: {Error}\n Aborting migration", - "placeholder": null - }, - { - "id": "To work with the config:", - "translation": "", - "message": "To work with the config:", - "placeholder": null - } - ] - } diff --git a/cmd/curio/internal/translations/translations.go b/cmd/curio/internal/translations/translations.go deleted file mode 100644 index 361e8e89401..00000000000 --- a/cmd/curio/internal/translations/translations.go +++ /dev/null @@ -1,27 +0,0 @@ -// Usage: -// To UPDATE translations: -// -// 1. add/change strings in guidedsetup folder that use d.T() or d.say(). -// -// 2. run `go generate` in the cmd/curio/internal/translations/ folder. -// -// 3. ChatGPT 3.5 can translate the ./locales/??/out.gotext.json files' -// which ONLY include the un-translated messages. -// APPEND to the messages.gotext.json files's array. -// -// ChatGPT fuss: -// - on a good day, you may need to hit "continue generating". -// - > 60? you'll need to give it sections of the file. -// -// 4. Re-import with `go generate` again. -// -// To ADD a language: -// 1. Add it to the list in updateLang.sh -// 2. Run `go generate` in the cmd/curio/internal/translations/ folder. -// 3. Follow the "Update translations" steps here. -// 4. Code will auto-detect the new language and use it. -// -// FUTURE Reliability: OpenAPI automation. -package translations - -//go:generate ./updateLang.sh diff --git a/cmd/curio/internal/translations/updateLang.sh b/cmd/curio/internal/translations/updateLang.sh deleted file mode 100755 index 6325ab1463a..00000000000 --- a/cmd/curio/internal/translations/updateLang.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -#OP: Only run if some file in ../guidedsetup* is newer than catalog.go -# Change this condition if using translations more widely. -if [ "$(find ../../guidedsetup/* -newermt "$(date -d '1 minute ago')" -newer catalog.go)" ] || [ "$(find locales/* -newermt "$(date -d '1 minute ago')" -newer catalog.go)" ]; then - gotext -srclang=en update -out=catalog.go -lang=en,zh,ko github.com/filecoin-project/lotus/cmd/curio/guidedsetup - go run knowns/main.go locales/zh locales/ko -fi diff --git a/cmd/curio/migrate.go b/cmd/curio/migrate.go deleted file mode 100644 index 5cf55bcb42a..00000000000 --- a/cmd/curio/migrate.go +++ /dev/null @@ -1,71 +0,0 @@ -package main - -import ( - "fmt" - - "github.com/urfave/cli/v2" - "golang.org/x/xerrors" - - cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/curio/guidedsetup" - "github.com/filecoin-project/lotus/node/repo" -) - -var configMigrateCmd = &cli.Command{ - Name: "from-miner", - Usage: "Express a database config (for curio) from an existing miner.", - Description: "Express a database config (for curio) from an existing miner.", - Flags: []cli.Flag{ - &cli.StringFlag{ - Name: FlagMinerRepo, - Aliases: []string{FlagMinerRepoDeprecation}, - EnvVars: []string{"LOTUS_MINER_PATH", "LOTUS_STORAGE_PATH"}, - Value: "~/.lotusminer", - Usage: fmt.Sprintf("Specify miner repo path. flag(%s) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON", FlagMinerRepoDeprecation), - }, - &cli.StringFlag{ - Name: "repo", - EnvVars: []string{"LOTUS_PATH"}, - Hidden: true, - Value: "~/.lotus", - }, - &cli.StringFlag{ - Name: "to-layer", - Aliases: []string{"t"}, - Usage: "The layer name for this data push. 'base' is recommended for single-miner setup.", - }, - &cli.BoolFlag{ - Name: "overwrite", - Aliases: []string{"o"}, - Usage: "Use this with --to-layer to replace an existing layer", - }, - }, - Action: fromMiner, -} - -const ( - FlagMinerRepo = "miner-repo" -) - -const FlagMinerRepoDeprecation = "storagerepo" - -func fromMiner(cctx *cli.Context) (err error) { - minerRepoPath := cctx.String(FlagMinerRepo) - layerName := cctx.String("to-layer") - overwrite := cctx.Bool("overwrite") - - // Populate API Key - _, header, err := cliutil.GetRawAPI(cctx, repo.FullNode, "v0") - if err != nil { - return fmt.Errorf("cannot read API: %w", err) - } - - ainfo, err := cliutil.GetAPIInfo(&cli.Context{}, repo.FullNode) - if err != nil { - return xerrors.Errorf(`could not get API info for FullNode: %w - Set the environment variable to the value of "lotus auth api-info --perm=admin"`, err) - } - chainApiInfo := header.Get("Authorization")[7:] + ":" + ainfo.Addr - _, err = guidedsetup.SaveConfigToLayer(minerRepoPath, layerName, overwrite, chainApiInfo) - return err -} diff --git a/cmd/curio/cli.go b/cmd/lotus-provider/cli.go similarity index 95% rename from cmd/curio/cli.go rename to cmd/lotus-provider/cli.go index 58383e2a782..dc1bdde1698 100644 --- a/cmd/curio/cli.go +++ b/cmd/lotus-provider/cli.go @@ -18,11 +18,11 @@ import ( "github.com/filecoin-project/lotus/api" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/cmd/curio/rpc" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/rpc" ) -const providerEnvVar = "CURIO_API_INFO" +const providerEnvVar = "PROVIDER_API_INFO" var cliCmd = &cli.Command{ Name: "cli", @@ -177,7 +177,7 @@ var cliCmd = &cli.Command{ } { - api, closer, err := rpc.GetCurioAPI(cctx) + api, closer, err := rpc.GetProviderAPI(cctx) if err != nil { return err } diff --git a/cmd/curio/config.go b/cmd/lotus-provider/config.go similarity index 92% rename from cmd/curio/config.go rename to cmd/lotus-provider/config.go index 20f2d059788..1f155f54351 100644 --- a/cmd/curio/config.go +++ b/cmd/lotus-provider/config.go @@ -15,7 +15,7 @@ import ( "github.com/urfave/cli/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" ) @@ -48,7 +48,7 @@ var configDefaultCmd = &cli.Command{ }, Action: func(cctx *cli.Context) error { comment := !cctx.Bool("no-comment") - cfg, err := deps.GetDefaultConfig(comment) + cfg, err := getDefaultConfig(comment) if err != nil { return err } @@ -58,6 +58,15 @@ var configDefaultCmd = &cli.Command{ }, } +func getDefaultConfig(comment bool) (string, error) { + c := config.DefaultLotusProvider() + cb, err := config.ConfigUpdate(c, nil, config.Commented(comment), config.DefaultKeepUncommented(), config.NoEnv()) + if err != nil { + return "", err + } + return string(cb), nil +} + var configSetCmd = &cli.Command{ Name: "set", Aliases: []string{"add", "update", "create"}, @@ -97,12 +106,12 @@ var configSetCmd = &cli.Command{ return fmt.Errorf("cannot read stream/file %w", err) } - curioConfig := config.DefaultCurioConfig() // ensure it's toml - _, err = deps.LoadConfigWithUpgrades(string(bytes), curioConfig) + lp := config.DefaultLotusProvider() // ensure it's toml + _, err = deps.LoadConfigWithUpgrades(string(bytes), lp) if err != nil { return fmt.Errorf("cannot decode file: %w", err) } - _ = curioConfig + _ = lp err = setConfig(db, name, string(bytes)) @@ -207,7 +216,7 @@ var configRmCmd = &cli.Command{ var configViewCmd = &cli.Command{ Name: "interpret", Aliases: []string{"view", "stacked", "stack"}, - Usage: "Interpret stacked config layers by this version of curio, with system-generated comments.", + Usage: "Interpret stacked config layers by this version of lotus-provider, with system-generated comments.", ArgsUsage: "a list of layers to be interpreted as the final config", Flags: []cli.Flag{ &cli.StringSliceFlag{ @@ -221,11 +230,11 @@ var configViewCmd = &cli.Command{ if err != nil { return err } - curioConfig, err := deps.GetConfig(cctx, db) + lp, err := deps.GetConfig(cctx, db) if err != nil { return err } - cb, err := config.ConfigUpdate(curioConfig, config.DefaultCurioConfig(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) + cb, err := config.ConfigUpdate(lp, config.DefaultLotusProvider(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) if err != nil { return xerrors.Errorf("cannot interpret config: %w", err) } @@ -290,12 +299,12 @@ var configEditCmd = &cli.Command{ } if cctx.IsSet("source") && source != layer && !cctx.Bool("no-interpret-source") { - lp := config.DefaultCurioConfig() + lp := config.DefaultLotusProvider() if _, err := toml.Decode(sourceConfig, lp); err != nil { return xerrors.Errorf("parsing source config: %w", err) } - cb, err := config.ConfigUpdate(lp, config.DefaultCurioConfig(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) + cb, err := config.ConfigUpdate(lp, config.DefaultLotusProvider(), config.Commented(true), config.DefaultKeepUncommented(), config.NoEnv()) if err != nil { return xerrors.Errorf("interpreting source config: %w", err) } @@ -353,18 +362,9 @@ var configEditCmd = &cli.Command{ }, } -func getDefaultConfig(comment bool) (string, error) { - c := config.DefaultCurioConfig() - cb, err := config.ConfigUpdate(c, nil, config.Commented(comment), config.DefaultKeepUncommented(), config.NoEnv()) - if err != nil { - return "", err - } - return string(cb), nil -} - func diff(sourceConf, newConf string) (string, error) { - lpSrc := config.DefaultCurioConfig() - lpNew := config.DefaultCurioConfig() + lpSrc := config.DefaultLotusProvider() + lpNew := config.DefaultLotusProvider() _, err := toml.Decode(sourceConf, lpSrc) if err != nil { diff --git a/cmd/lotus-provider/config_migrate.go b/cmd/lotus-provider/config_migrate.go new file mode 100644 index 00000000000..572a798a597 --- /dev/null +++ b/cmd/lotus-provider/config_migrate.go @@ -0,0 +1,254 @@ +package main + +import ( + "bytes" + "context" + "encoding/base64" + "errors" + "fmt" + "os" + "path" + "strings" + + "github.com/BurntSushi/toml" + "github.com/fatih/color" + "github.com/ipfs/go-datastore" + "github.com/samber/lo" + "github.com/urfave/cli/v2" + "golang.org/x/xerrors" + + "github.com/filecoin-project/go-address" + + cliutil "github.com/filecoin-project/lotus/cli/util" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/node/config" + "github.com/filecoin-project/lotus/node/modules" + "github.com/filecoin-project/lotus/node/repo" +) + +var configMigrateCmd = &cli.Command{ + Name: "from-miner", + Usage: "Express a database config (for lotus-provider) from an existing miner.", + Description: "Express a database config (for lotus-provider) from an existing miner.", + Flags: []cli.Flag{ + &cli.StringFlag{ + Name: FlagMinerRepo, + Aliases: []string{FlagMinerRepoDeprecation}, + EnvVars: []string{"LOTUS_MINER_PATH", "LOTUS_STORAGE_PATH"}, + Value: "~/.lotusminer", + Usage: "Miner repo path", + }, + &cli.StringFlag{ + Name: "repo", + EnvVars: []string{"LOTUS_PATH"}, + Hidden: true, + Value: "~/.lotus", + }, + &cli.StringFlag{ + Name: "to-layer", + Aliases: []string{"t"}, + Usage: "The layer name for this data push. 'base' is recommended for single-miner setup.", + }, + &cli.BoolFlag{ + Name: "overwrite", + Aliases: []string{"o"}, + Usage: "Use this with --to-layer to replace an existing layer", + }, + }, + Action: fromMiner, +} + +const ( + FlagMinerRepo = "miner-repo" +) + +const FlagMinerRepoDeprecation = "storagerepo" + +func fromMiner(cctx *cli.Context) (err error) { + ctx := context.Background() + cliCommandColor := color.New(color.FgHiBlue).SprintFunc() + configColor := color.New(color.FgHiGreen).SprintFunc() + + r, err := repo.NewFS(cctx.String(FlagMinerRepo)) + if err != nil { + return err + } + + ok, err := r.Exists() + if err != nil { + return err + } + + if !ok { + return fmt.Errorf("repo not initialized") + } + + lr, err := r.LockRO(repo.StorageMiner) + if err != nil { + return fmt.Errorf("locking repo: %w", err) + } + defer func() { _ = lr.Close() }() + + cfgNode, err := lr.Config() + if err != nil { + return fmt.Errorf("getting node config: %w", err) + } + smCfg := cfgNode.(*config.StorageMiner) + + db, err := harmonydb.NewFromConfig(smCfg.HarmonyDB) + if err != nil { + return fmt.Errorf("could not reach the database. Ensure the Miner config toml's HarmonyDB entry"+ + " is setup to reach Yugabyte correctly: %w", err) + } + + var titles []string + err = db.Select(ctx, &titles, `SELECT title FROM harmony_config WHERE LENGTH(config) > 0`) + if err != nil { + return fmt.Errorf("miner cannot reach the db. Ensure the config toml's HarmonyDB entry"+ + " is setup to reach Yugabyte correctly: %s", err.Error()) + } + name := cctx.String("to-layer") + if name == "" { + name = fmt.Sprintf("mig%d", len(titles)) + } else { + if lo.Contains(titles, name) && !cctx.Bool("overwrite") { + return errors.New("the overwrite flag is needed to replace existing layer: " + name) + } + } + msg := "Layer " + configColor(name) + ` created. ` + + // Copy over identical settings: + + buf, err := os.ReadFile(path.Join(lr.Path(), "config.toml")) + if err != nil { + return fmt.Errorf("could not read config.toml: %w", err) + } + lpCfg := config.DefaultLotusProvider() + _, err = deps.LoadConfigWithUpgrades(string(buf), lpCfg) + if err != nil { + return fmt.Errorf("could not decode toml: %w", err) + } + + // Populate Miner Address + mmeta, err := lr.Datastore(ctx, "/metadata") + if err != nil { + return xerrors.Errorf("opening miner metadata datastore: %w", err) + } + defer func() { + _ = mmeta.Close() + }() + + maddrBytes, err := mmeta.Get(ctx, datastore.NewKey("miner-address")) + if err != nil { + return xerrors.Errorf("getting miner address datastore entry: %w", err) + } + + addr, err := address.NewFromBytes(maddrBytes) + if err != nil { + return xerrors.Errorf("parsing miner actor address: %w", err) + } + + lpCfg.Addresses = []config.LotusProviderAddresses{{ + MinerAddresses: []string{addr.String()}, + }} + + ks, err := lr.KeyStore() + if err != nil { + return xerrors.Errorf("keystore err: %w", err) + } + js, err := ks.Get(modules.JWTSecretName) + if err != nil { + return xerrors.Errorf("error getting JWTSecretName: %w", err) + } + + lpCfg.Apis.StorageRPCSecret = base64.StdEncoding.EncodeToString(js.PrivateKey) + + // Populate API Key + _, header, err := cliutil.GetRawAPI(cctx, repo.FullNode, "v0") + if err != nil { + return fmt.Errorf("cannot read API: %w", err) + } + + ainfo, err := cliutil.GetAPIInfo(&cli.Context{}, repo.FullNode) + if err != nil { + return xerrors.Errorf(`could not get API info for FullNode: %w + Set the environment variable to the value of "lotus auth api-info --perm=admin"`, err) + } + lpCfg.Apis.ChainApiInfo = []string{header.Get("Authorization")[7:] + ":" + ainfo.Addr} + + // WindowPoSt message + msg += "\n!! Before running lotus-provider with Window PoSt enabled, ensure any miner/worker answering of WindowPost is disabled by " + + "(on Miner) " + configColor("DisableBuiltinWindowPoSt=true") + " and (on Workers) not enabling windowpost on CLI or via " + + "environment variable " + configColor("LOTUS_WORKER_WINDOWPOST") + "." + + // WinningPoSt message + msg += "\n!! Before running lotus-provider with Winning PoSt enabled, ensure any miner/worker answering of WinningPost is disabled by " + + "(on Miner) " + configColor("DisableBuiltinWinningPoSt=true") + " and (on Workers) not enabling winningpost on CLI or via " + + "environment variable " + configColor("LOTUS_WORKER_WINNINGPOST") + "." + + // Express as configTOML + configTOML := &bytes.Buffer{} + if err = toml.NewEncoder(configTOML).Encode(lpCfg); err != nil { + return err + } + + if !lo.Contains(titles, "base") { + cfg, err := getDefaultConfig(true) + if err != nil { + return xerrors.Errorf("Cannot get default config: %w", err) + } + _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ('base', $1)", cfg) + + if err != nil { + return err + } + } + + if cctx.Bool("overwrite") { + i, err := db.Exec(ctx, "DELETE FROM harmony_config WHERE title=$1", name) + if i != 0 { + fmt.Println("Overwriting existing layer") + } + if err != nil { + fmt.Println("Got error while deleting existing layer: " + err.Error()) + } + } + + _, err = db.Exec(ctx, "INSERT INTO harmony_config (title, config) VALUES ($1, $2)", name, configTOML.String()) + if err != nil { + return err + } + + dbSettings := "" + def := config.DefaultStorageMiner().HarmonyDB + if def.Hosts[0] != smCfg.HarmonyDB.Hosts[0] { + dbSettings += ` --db-host="` + strings.Join(smCfg.HarmonyDB.Hosts, ",") + `"` + } + if def.Port != smCfg.HarmonyDB.Port { + dbSettings += " --db-port=" + smCfg.HarmonyDB.Port + } + if def.Username != smCfg.HarmonyDB.Username { + dbSettings += ` --db-user="` + smCfg.HarmonyDB.Username + `"` + } + if def.Password != smCfg.HarmonyDB.Password { + dbSettings += ` --db-password="` + smCfg.HarmonyDB.Password + `"` + } + if def.Database != smCfg.HarmonyDB.Database { + dbSettings += ` --db-name="` + smCfg.HarmonyDB.Database + `"` + } + + var layerMaybe string + if name != "base" { + layerMaybe = "--layer=" + name + } + + msg += ` +To work with the config: +` + cliCommandColor(`lotus-provider `+dbSettings+` config help `) + msg += ` +To run Lotus Provider: in its own machine or cgroup without other files, use the command: +` + cliCommandColor(`lotus-provider `+dbSettings+` run `+layerMaybe) + fmt.Println(msg) + return nil +} diff --git a/cmd/curio/config_new.go b/cmd/lotus-provider/config_new.go similarity index 95% rename from cmd/curio/config_new.go rename to cmd/lotus-provider/config_new.go index 38ca44597fb..e9d8382ac8f 100644 --- a/cmd/curio/config_new.go +++ b/cmd/lotus-provider/config_new.go @@ -18,7 +18,7 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/repo" ) @@ -73,7 +73,7 @@ var configNewCmd = &cli.Command{ msg := "Layer " + configColor(name) + ` created. ` // setup config - lpCfg := config.DefaultCurioConfig() + lpCfg := config.DefaultLotusProvider() for _, addr := range cctx.Args().Slice() { maddr, err := address.NewFromString(addr) @@ -86,7 +86,7 @@ var configNewCmd = &cli.Command{ return xerrors.Errorf("Failed to get miner info: %w", err) } - lpCfg.Addresses = append(lpCfg.Addresses, config.CurioAddresses{ + lpCfg.Addresses = append(lpCfg.Addresses, config.LotusProviderAddresses{ PreCommitControl: nil, CommitControl: nil, TerminateControl: nil, diff --git a/cmd/curio/deps/deps.go b/cmd/lotus-provider/deps/deps.go similarity index 63% rename from cmd/curio/deps/deps.go rename to cmd/lotus-provider/deps/deps.go index 4ce660739f5..e03e7dd24b3 100644 --- a/cmd/curio/deps/deps.go +++ b/cmd/lotus-provider/deps/deps.go @@ -1,4 +1,4 @@ -// Package deps provides the dependencies for the curio node. +// Package deps provides the dependencies for the lotus provider node. package deps import ( @@ -9,9 +9,8 @@ import ( "fmt" "net" "net/http" - "net/url" "os" - "path/filepath" + "regexp" "strings" "github.com/BurntSushi/toml" @@ -19,7 +18,6 @@ import ( ds "github.com/ipfs/go-datastore" dssync "github.com/ipfs/go-datastore/sync" logging "github.com/ipfs/go-log/v2" - "github.com/samber/lo" "github.com/urfave/cli/v2" "golang.org/x/xerrors" @@ -29,8 +27,7 @@ import ( "github.com/filecoin-project/go-statestore" "github.com/filecoin-project/lotus/api" - curio "github.com/filecoin-project/lotus/curiosrc" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" + cliutil "github.com/filecoin-project/lotus/cli/util" "github.com/filecoin-project/lotus/journal" "github.com/filecoin-project/lotus/journal/alerting" "github.com/filecoin-project/lotus/journal/fsjournal" @@ -39,90 +36,25 @@ import ( "github.com/filecoin-project/lotus/node/modules" "github.com/filecoin-project/lotus/node/modules/dtypes" "github.com/filecoin-project/lotus/node/repo" + "github.com/filecoin-project/lotus/provider" + "github.com/filecoin-project/lotus/provider/multictladdr" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer" "github.com/filecoin-project/lotus/storage/sealer/ffiwrapper" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) -var log = logging.Logger("curio/deps") +var log = logging.Logger("lotus-provider/deps") func MakeDB(cctx *cli.Context) (*harmonydb.DB, error) { - // #1 CLI opts - fromCLI := func() (*harmonydb.DB, error) { - dbConfig := config.HarmonyDB{ - Username: cctx.String("db-user"), - Password: cctx.String("db-password"), - Hosts: strings.Split(cctx.String("db-host"), ","), - Database: cctx.String("db-name"), - Port: cctx.String("db-port"), - } - return harmonydb.NewFromConfig(dbConfig) - } - - readToml := func(path string) (*harmonydb.DB, error) { - cfg, err := config.FromFile(path) - if err != nil { - return nil, err - } - if c, ok := cfg.(*config.StorageMiner); ok { - return harmonydb.NewFromConfig(c.HarmonyDB) - } - return nil, errors.New("not a miner config") - } - - // #2 Try local miner config - fromMinerEnv := func() (*harmonydb.DB, error) { - v := os.Getenv("LOTUS_MINER_PATH") - if v == "" { - return nil, errors.New("no miner env") - } - return readToml(filepath.Join(v, "config.toml")) - - } - - fromMiner := func() (*harmonydb.DB, error) { - u, err := os.UserHomeDir() - if err != nil { - return nil, err - } - return readToml(filepath.Join(u, ".lotusminer/config.toml")) - } - fromEnv := func() (*harmonydb.DB, error) { - // #3 Try env - u, err := url.Parse(os.Getenv("CURIO_DB")) - if err != nil { - return nil, errors.New("no db connection string found in CURIO_DB env") - } - cfg := config.DefaultStorageMiner().HarmonyDB - if u.User.Username() != "" { - cfg.Username = u.User.Username() - } - if p, ok := u.User.Password(); ok && p != "" { - cfg.Password = p - } - if u.Hostname() != "" { - cfg.Hosts = []string{u.Hostname()} - } - if u.Port() != "" { - cfg.Port = u.Port() - } - if strings.TrimPrefix(u.Path, "/") != "" { - cfg.Database = strings.TrimPrefix(u.Path, "/") - } - - return harmonydb.NewFromConfig(cfg) - } - - for _, f := range []func() (*harmonydb.DB, error){fromCLI, fromMinerEnv, fromMiner, fromEnv} { - db, err := f() - if err != nil { - continue - } - return db, nil - } - log.Error("No db connection string found. User CLI args or env var: set CURIO_DB=postgres://USER:PASSWORD@HOST:PORT/DATABASE") - return fromCLI() //in-case it's not about bad config. + dbConfig := config.HarmonyDB{ + Username: cctx.String("db-user"), + Password: cctx.String("db-password"), + Hosts: strings.Split(cctx.String("db-host"), ","), + Database: cctx.String("db-name"), + Port: cctx.String("db-port"), + } + return harmonydb.NewFromConfig(dbConfig) } type JwtPayload struct { @@ -161,8 +93,8 @@ func GetDeps(ctx context.Context, cctx *cli.Context) (*Deps, error) { } type Deps struct { - Cfg *config.CurioConfig // values - DB *harmonydb.DB // has itest capability + Cfg *config.LotusProviderConfig + DB *harmonydb.DB Full api.FullNode Verif storiface.Verifier LW *sealer.LocalWorker @@ -196,7 +128,7 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, return err } if !ok { - if err := r.Init(repo.Curio); err != nil { + if err := r.Init(repo.Provider); err != nil { return err } } @@ -224,7 +156,7 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, } if deps.As == nil { - deps.As, err = curio.AddressSelector(deps.Cfg.Addresses)() + deps.As, err = provider.AddressSelector(deps.Cfg.Addresses)() if err != nil { return err } @@ -254,7 +186,7 @@ func (deps *Deps) PopulateRemainingDeps(ctx context.Context, cctx *cli.Context, if v := os.Getenv("FULLNODE_API_INFO"); v != "" { cfgApiInfo = []string{v} } - deps.Full, fullCloser, err = getFullNodeAPIV1Curio(cctx, cfgApiInfo) + deps.Full, fullCloser, err = cliutil.GetFullNodeAPIV1LotusProvider(cctx, cfgApiInfo) if err != nil { return err } @@ -304,7 +236,7 @@ Get it with: jq .PrivateKey ~/.lotus-miner/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU`, wstates := statestore.New(dssync.MutexWrap(ds.NewMapDatastore())) // todo localWorker isn't the abstraction layer we want to use here, we probably want to go straight to ffiwrapper - // maybe with a curio specific abstraction. LocalWorker does persistent call tracking which we probably + // maybe with a lotus-provider specific abstraction. LocalWorker does persistent call tracking which we probably // don't need (ehh.. maybe we do, the async callback system may actually work decently well with harmonytask) deps.LW = sealer.NewLocalWorker(sealer.WorkerConfig{ MaxParallelChallengeReads: deps.Cfg.Proving.ParallelCheckLimit, @@ -341,30 +273,21 @@ Get it with: jq .PrivateKey ~/.lotus-miner/keystore/MF2XI2BNNJ3XILLQOJUXMYLUMU`, return nil } -func LoadConfigWithUpgrades(text string, curioConfigWithDefaults *config.CurioConfig) (toml.MetaData, error) { +var oldAddresses = regexp.MustCompile("(?i)^\\[addresses\\]$") + +func LoadConfigWithUpgrades(text string, lp *config.LotusProviderConfig) (toml.MetaData, error) { // allow migration from old config format that was limited to 1 wallet setup. - newText := strings.Join(lo.Map(strings.Split(text, "\n"), func(line string, _ int) string { - if strings.EqualFold(line, "[addresses]") { - return "[[addresses]]" - } - return line - }), "\n") - meta, err := toml.Decode(newText, &curioConfigWithDefaults) - for i := range curioConfigWithDefaults.Addresses { - if curioConfigWithDefaults.Addresses[i].PreCommitControl == nil { - curioConfigWithDefaults.Addresses[i].PreCommitControl = []string{} - } - if curioConfigWithDefaults.Addresses[i].CommitControl == nil { - curioConfigWithDefaults.Addresses[i].CommitControl = []string{} - } - if curioConfigWithDefaults.Addresses[i].TerminateControl == nil { - curioConfigWithDefaults.Addresses[i].TerminateControl = []string{} - } + newText := oldAddresses.ReplaceAllString(text, "[[addresses]]") + + if text != newText { + log.Warnw("Upgraded config!", "old", text, "new", newText) } + + meta, err := toml.Decode(newText, &lp) return meta, err } -func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.CurioConfig, error) { - curioConfig := config.DefaultCurioConfig() +func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.LotusProviderConfig, error) { + lp := config.DefaultLotusProvider() have := []string{} layers := append([]string{"base"}, cctx.StringSlice("layers")...) // Always stack on top of "base" layer for _, layer := range layers { @@ -375,35 +298,26 @@ func GetConfig(cctx *cli.Context, db *harmonydb.DB) (*config.CurioConfig, error) return nil, fmt.Errorf("missing layer '%s' ", layer) } if layer == "base" { - return nil, errors.New(`curio defaults to a layer named 'base'. - Either use 'migrate' command or edit a base.toml and upload it with: curio config set base.toml`) + return nil, errors.New(`lotus-provider defaults to a layer named 'base'. + Either use 'migrate' command or edit a base.toml and upload it with: lotus-provider config set base.toml`) } return nil, fmt.Errorf("could not read layer '%s': %w", layer, err) } - meta, err := LoadConfigWithUpgrades(text, curioConfig) + meta, err := LoadConfigWithUpgrades(text, lp) if err != nil { - return curioConfig, fmt.Errorf("could not read layer, bad toml %s: %w", layer, err) + return lp, fmt.Errorf("could not read layer, bad toml %s: %w", layer, err) } for _, k := range meta.Keys() { have = append(have, strings.Join(k, " ")) } - log.Infow("Using layer", "layer", layer, "config", curioConfig) + log.Infow("Using layer", "layer", layer, "config", lp) } _ = have // FUTURE: verify that required fields are here. // If config includes 3rd-party config, consider JSONSchema as a way that // 3rd-parties can dynamically include config requirements and we can // validate the config. Because of layering, we must validate @ startup. - return curioConfig, nil -} - -func GetDefaultConfig(comment bool) (string, error) { - c := config.DefaultCurioConfig() - cb, err := config.ConfigUpdate(c, nil, config.Commented(comment), config.DefaultKeepUncommented(), config.NoEnv()) - if err != nil { - return "", err - } - return string(cb), nil + return lp, nil } func GetDepsCLI(ctx context.Context, cctx *cli.Context) (*Deps, error) { @@ -417,7 +331,7 @@ func GetDepsCLI(ctx context.Context, cctx *cli.Context) (*Deps, error) { return nil, err } - full, fullCloser, err := getFullNodeAPIV1Curio(cctx, cfg.Apis.ChainApiInfo) + full, fullCloser, err := cliutil.GetFullNodeAPIV1LotusProvider(cctx, cfg.Apis.ChainApiInfo) if err != nil { return nil, err } diff --git a/cmd/curio/main.go b/cmd/lotus-provider/main.go similarity index 75% rename from cmd/curio/main.go rename to cmd/lotus-provider/main.go index 8c64af37984..b4342d49a82 100644 --- a/cmd/curio/main.go +++ b/cmd/lotus-provider/main.go @@ -16,8 +16,7 @@ import ( "github.com/filecoin-project/lotus/build" lcli "github.com/filecoin-project/lotus/cli" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/cmd/curio/guidedsetup" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/lotuslog" "github.com/filecoin-project/lotus/lib/tracing" "github.com/filecoin-project/lotus/node/repo" @@ -25,7 +24,7 @@ import ( var log = logging.Logger("main") -func setupCloseHandler() { +func SetupCloseHandler() { c := make(chan os.Signal, 1) signal.Notify(c, os.Interrupt, syscall.SIGTERM) go func() { @@ -37,6 +36,7 @@ func setupCloseHandler() { } func main() { + SetupCloseHandler() lotuslog.SetupLogLevels() @@ -48,12 +48,10 @@ func main() { configCmd, testCmd, webCmd, - guidedsetup.GuidedsetupCmd, - configMigrateCmd, sealCmd, } - jaeger := tracing.SetupJaegerTracing("curio") + jaeger := tracing.SetupJaegerTracing("lotus") defer func() { if jaeger != nil { _ = jaeger.ForceFlush(context.Background()) @@ -67,7 +65,7 @@ func main() { if jaeger != nil { _ = jaeger.Shutdown(cctx.Context) } - jaeger = tracing.SetupJaegerTracing("curio/" + cmd.Name) + jaeger = tracing.SetupJaegerTracing("lotus/" + cmd.Name) if cctx.IsSet("color") { color.NoColor = !cctx.Bool("color") @@ -82,14 +80,10 @@ func main() { } app := &cli.App{ - Name: "curio", + Name: "lotus-provider", Usage: "Filecoin decentralized storage network provider", Version: build.UserVersion(), EnableBashCompletion: true, - Before: func(c *cli.Context) error { - setupCloseHandler() - return nil - }, Flags: []cli.Flag{ &cli.BoolFlag{ // examined in the Before above @@ -99,45 +93,48 @@ func main() { }, &cli.StringFlag{ Name: "panic-reports", - EnvVars: []string{"CURIO_PANIC_REPORT_PATH"}, + EnvVars: []string{"LOTUS_PANIC_REPORT_PATH"}, Hidden: true, - Value: "~/.curio", // should follow --repo default + Value: "~/.lotusprovider", // should follow --repo default }, &cli.StringFlag{ Name: "db-host", - EnvVars: []string{"CURIO_DB_HOST", "CURIO_HARMONYDB_HOSTS"}, + EnvVars: []string{"LOTUS_DB_HOST"}, Usage: "Command separated list of hostnames for yugabyte cluster", Value: "yugabyte", }, &cli.StringFlag{ Name: "db-name", - EnvVars: []string{"CURIO_DB_NAME", "CURIO_HARMONYDB_NAME"}, + EnvVars: []string{"LOTUS_DB_NAME", "LOTUS_HARMONYDB_HOSTS"}, Value: "yugabyte", }, &cli.StringFlag{ Name: "db-user", - EnvVars: []string{"CURIO_DB_USER", "CURIO_HARMONYDB_USERNAME"}, + EnvVars: []string{"LOTUS_DB_USER", "LOTUS_HARMONYDB_USERNAME"}, Value: "yugabyte", }, &cli.StringFlag{ Name: "db-password", - EnvVars: []string{"CURIO_DB_PASSWORD", "CURIO_HARMONYDB_PASSWORD"}, + EnvVars: []string{"LOTUS_DB_PASSWORD", "LOTUS_HARMONYDB_PASSWORD"}, Value: "yugabyte", }, &cli.StringFlag{ Name: "db-port", - EnvVars: []string{"CURIO_DB_PORT", "CURIO_HARMONYDB_PORT"}, + EnvVars: []string{"LOTUS_DB_PORT", "LOTUS_HARMONYDB_PORT"}, Hidden: true, Value: "5433", }, &cli.StringFlag{ Name: deps.FlagRepoPath, - EnvVars: []string{"CURIO_REPO_PATH"}, - Value: "~/.curio", + EnvVars: []string{"LOTUS_REPO_PATH"}, + Value: "~/.lotusprovider", }, cliutil.FlagVeryVerbose, }, Commands: append(local, lcli.CommonCommands...), + Before: func(c *cli.Context) error { + return nil + }, After: func(c *cli.Context) error { if r := recover(); r != nil { p, err := homedir.Expand(c.String(FlagMinerRepo)) @@ -146,7 +143,7 @@ func main() { panic(r) } - // Generate report in CURIO_PATH and re-raise panic + // Generate report in LOTUS_PATH and re-raise panic build.GeneratePanicReport(c.String("panic-reports"), p, c.App.Name) panic(r) } @@ -154,6 +151,6 @@ func main() { }, } app.Setup() - app.Metadata["repoType"] = repo.Curio + app.Metadata["repoType"] = repo.Provider lcli.RunApp(app) } diff --git a/cmd/curio/pipeline.go b/cmd/lotus-provider/pipeline.go similarity index 92% rename from cmd/curio/pipeline.go rename to cmd/lotus-provider/pipeline.go index 1c3f5d94a28..74c49b16a02 100644 --- a/cmd/curio/pipeline.go +++ b/cmd/lotus-provider/pipeline.go @@ -12,9 +12,9 @@ import ( "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/curiosrc/seal" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/provider/lpseal" ) var sealCmd = &cli.Command{ @@ -113,7 +113,7 @@ var sealStartCmd = &cli.Command{ return xerrors.Errorf("getting seal proof type: %w", err) } - num, err := seal.AllocateSectorNumbers(ctx, dep.Full, dep.DB, act, cctx.Int("count"), func(tx *harmonydb.Tx, numbers []abi.SectorNumber) (bool, error) { + num, err := lpseal.AllocateSectorNumbers(ctx, dep.Full, dep.DB, act, cctx.Int("count"), func(tx *harmonydb.Tx, numbers []abi.SectorNumber) (bool, error) { for _, n := range numbers { _, err := tx.Exec("insert into sectors_sdr_pipeline (sp_id, sector_number, reg_seal_proof) values ($1, $2, $3)", mid, n, spt) if err != nil { diff --git a/cmd/curio/proving.go b/cmd/lotus-provider/proving.go similarity index 94% rename from cmd/curio/proving.go rename to cmd/lotus-provider/proving.go index 3b5a3e0e47b..c003c907f44 100644 --- a/cmd/curio/proving.go +++ b/cmd/lotus-provider/proving.go @@ -15,9 +15,9 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/dline" - "github.com/filecoin-project/lotus/cmd/curio/deps" - curio "github.com/filecoin-project/lotus/curiosrc" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/provider" ) var testCmd = &cli.Command{ @@ -27,9 +27,6 @@ var testCmd = &cli.Command{ //provingInfoCmd, wdPostCmd, }, - Before: func(cctx *cli.Context) error { - return nil - }, } var wdPostCmd = &cli.Command{ @@ -50,7 +47,7 @@ var wdPostCmd = &cli.Command{ var wdPostTaskCmd = &cli.Command{ Name: "task", Aliases: []string{"scheduled", "schedule", "async", "asynchronous"}, - Usage: "Test the windowpost scheduler by running it on the next available curio. ", + Usage: "Test the windowpost scheduler by running it on the next available lotus-provider. ", Flags: []cli.Flag{ &cli.Uint64Flag{ Name: "deadline", @@ -151,7 +148,7 @@ It will not send any messages to the chain. Since it can compute any deadline, o &cli.StringFlag{ Name: "storage-json", Usage: "path to json file containing storage config", - Value: "~/.curio/storage.json", + Value: "~/.lotus-provider/storage.json", }, &cli.Uint64Flag{ Name: "partition", @@ -167,8 +164,7 @@ It will not send any messages to the chain. Since it can compute any deadline, o return err } - wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := curio.WindowPostScheduler( - ctx, deps.Cfg.Fees, deps.Cfg.Proving, deps.Full, deps.Verif, deps.LW, nil, nil, + wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := provider.WindowPostScheduler(ctx, deps.Cfg.Fees, deps.Cfg.Proving, deps.Full, deps.Verif, deps.LW, nil, nil, deps.As, deps.Maddrs, deps.DB, deps.Stor, deps.Si, deps.Cfg.Subsystems.WindowPostMaxTasks) if err != nil { return err diff --git a/cmd/curio/rpc/rpc.go b/cmd/lotus-provider/rpc/rpc.go similarity index 80% rename from cmd/curio/rpc/rpc.go rename to cmd/lotus-provider/rpc/rpc.go index 4f3f278d1d0..54eec45e8e6 100644 --- a/cmd/curio/rpc/rpc.go +++ b/cmd/lotus-provider/rpc/rpc.go @@ -27,33 +27,34 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/api/client" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/curiosrc/market" - "github.com/filecoin-project/lotus/curiosrc/web" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/rpcenc" "github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/metrics/proxy" "github.com/filecoin-project/lotus/node/repo" + "github.com/filecoin-project/lotus/provider/lpmarket" + "github.com/filecoin-project/lotus/provider/lpweb" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer/fsutil" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) -var log = logging.Logger("curio/rpc") +var log = logging.Logger("lp/rpc") + var permissioned = os.Getenv("LOTUS_DISABLE_AUTH_PERMISSIONED") != "1" -func CurioHandler( +func LotusProviderHandler( authv func(ctx context.Context, token string) ([]auth.Permission, error), remote http.HandlerFunc, - a api.Curio, + a api.LotusProvider, permissioned bool) http.Handler { mux := mux.NewRouter() readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder() rpcServer := jsonrpc.NewServer(jsonrpc.WithServerErrors(api.RPCErrors), readerServerOpt) - wapi := proxy.MetricedAPI[api.Curio, api.CurioStruct](a) + wapi := proxy.MetricedAPI[api.LotusProvider, api.LotusProviderStruct](a) if permissioned { - wapi = api.PermissionedAPI[api.Curio, api.CurioStruct](wapi) + wapi = api.PermissionedAPI[api.LotusProvider, api.LotusProviderStruct](wapi) } rpcServer.Register("Filecoin", wapi) @@ -75,16 +76,13 @@ func CurioHandler( return ah } -type CurioAPI struct { +type ProviderAPI struct { *deps.Deps paths.SectorIndex ShutdownChan chan struct{} } -func (p *CurioAPI) Version(context.Context) (api.Version, error) { - return api.CurioAPIVersion0, nil -} -func (p *CurioAPI) StorageDetachLocal(ctx context.Context, path string) error { +func (p *ProviderAPI) StorageDetachLocal(ctx context.Context, path string) error { path, err := homedir.Expand(path) if err != nil { return xerrors.Errorf("expanding local path: %w", err) @@ -132,7 +130,7 @@ func (p *CurioAPI) StorageDetachLocal(ctx context.Context, path string) error { return p.LocalStore.ClosePath(ctx, localPath.ID) } -func (p *CurioAPI) StorageLocal(ctx context.Context) (map[storiface.ID]string, error) { +func (p *ProviderAPI) StorageLocal(ctx context.Context) (map[storiface.ID]string, error) { ps, err := p.LocalStore.Local(ctx) if err != nil { return nil, err @@ -146,23 +144,27 @@ func (p *CurioAPI) StorageLocal(ctx context.Context) (map[storiface.ID]string, e return out, nil } -func (p *CurioAPI) StorageStat(ctx context.Context, id storiface.ID) (fsutil.FsStat, error) { +func (p *ProviderAPI) StorageStat(ctx context.Context, id storiface.ID) (fsutil.FsStat, error) { return p.Stor.FsStat(ctx, id) } -func (p *CurioAPI) AllocatePieceToSector(ctx context.Context, maddr address.Address, piece api.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (api.SectorOffset, error) { - di := market.NewPieceIngester(p.Deps.DB, p.Deps.Full) +func (p *ProviderAPI) Version(context.Context) (api.Version, error) { + return api.ProviderAPIVersion0, nil +} + +func (p *ProviderAPI) AllocatePieceToSector(ctx context.Context, maddr address.Address, piece api.PieceDealInfo, rawSize int64, source url.URL, header http.Header) (api.SectorOffset, error) { + di := lpmarket.NewPieceIngester(p.Deps.DB, p.Deps.Full) return di.AllocatePieceToSector(ctx, maddr, piece, rawSize, source, header) } // Trigger shutdown -func (p *CurioAPI) Shutdown(context.Context) error { +func (p *ProviderAPI) Shutdown(context.Context) error { close(p.ShutdownChan) return nil } -func (p *CurioAPI) StorageAddLocal(ctx context.Context, path string) error { +func (p *ProviderAPI) StorageAddLocal(ctx context.Context, path string) error { path, err := homedir.Expand(path) if err != nil { return xerrors.Errorf("expanding local path: %w", err) @@ -210,10 +212,10 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c } // Serve the RPC. srv := &http.Server{ - Handler: CurioHandler( + Handler: LotusProviderHandler( authVerify, remoteHandler, - &CurioAPI{dependencies, dependencies.Si, shutdownChan}, + &ProviderAPI{dependencies, dependencies.Si, shutdownChan}, permissioned), ReadHeaderTimeout: time.Minute * 3, BaseContext: func(listener net.Listener) context.Context { @@ -228,7 +230,7 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c eg.Go(srv.ListenAndServe) if dependencies.Cfg.Subsystems.EnableWebGui { - web, err := web.GetSrv(ctx, dependencies) + web, err := lpweb.GetSrv(ctx, dependencies) if err != nil { return err } @@ -250,8 +252,8 @@ func ListenAndServe(ctx context.Context, dependencies *deps.Deps, shutdownChan c return eg.Wait() } -func GetCurioAPI(ctx *cli.Context) (api.Curio, jsonrpc.ClientCloser, error) { - addr, headers, err := cliutil.GetRawAPI(ctx, repo.Curio, "v0") +func GetProviderAPI(ctx *cli.Context) (api.LotusProvider, jsonrpc.ClientCloser, error) { + addr, headers, err := cliutil.GetRawAPI(ctx, repo.Provider, "v0") if err != nil { return nil, nil, err } @@ -270,5 +272,5 @@ func GetCurioAPI(ctx *cli.Context) (api.Curio, jsonrpc.ClientCloser, error) { addr = u.String() - return client.NewCurioRpc(ctx.Context, addr, headers) + return client.NewProviderRpc(ctx.Context, addr, headers) } diff --git a/cmd/curio/run.go b/cmd/lotus-provider/run.go similarity index 88% rename from cmd/curio/run.go rename to cmd/lotus-provider/run.go index 35fdf4a4d03..018f746f0d1 100644 --- a/cmd/curio/run.go +++ b/cmd/lotus-provider/run.go @@ -14,9 +14,9 @@ import ( "github.com/filecoin-project/lotus/build" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/cmd/curio/rpc" - "github.com/filecoin-project/lotus/cmd/curio/tasks" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/rpc" + "github.com/filecoin-project/lotus/cmd/lotus-provider/tasks" "github.com/filecoin-project/lotus/lib/ulimit" "github.com/filecoin-project/lotus/metrics" "github.com/filecoin-project/lotus/node" @@ -28,7 +28,7 @@ type stackTracer interface { var runCmd = &cli.Command{ Name: "run", - Usage: "Start a Curio process", + Usage: "Start a lotus provider process", Flags: []cli.Flag{ &cli.StringFlag{ Name: "listen", @@ -53,12 +53,12 @@ var runCmd = &cli.Command{ &cli.StringFlag{ Name: "storage-json", Usage: "path to json file containing storage config", - Value: "~/.curio/storage.json", + Value: "~/.lotus-provider/storage.json", }, &cli.StringFlag{ Name: "journal", Usage: "path to journal files", - Value: "~/.curio/", + Value: "~/.lotus-provider/", }, &cli.StringSliceFlag{ Name: "layers", @@ -89,7 +89,7 @@ var runCmd = &cli.Command{ ctx, _ := tag.New(lcli.DaemonContext(cctx), tag.Insert(metrics.Version, build.BuildVersion), tag.Insert(metrics.Commit, build.CurrentCommit), - tag.Insert(metrics.NodeType, "curio"), + tag.Insert(metrics.NodeType, "provider"), ) shutdownChan := make(chan struct{}) { @@ -135,7 +135,7 @@ var runCmd = &cli.Command{ return err } finishCh := node.MonitorShutdown(shutdownChan) //node.ShutdownHandler{Component: "rpc server", StopFunc: rpcStopper}, - //node.ShutdownHandler{Component: "curio", StopFunc: stop}, + //node.ShutdownHandler{Component: "provider", StopFunc: stop}, <-finishCh return nil @@ -144,8 +144,8 @@ var runCmd = &cli.Command{ var webCmd = &cli.Command{ Name: "web", - Usage: "Start Curio web interface", - Description: `Start an instance of Curio web interface. + Usage: "Start lotus provider web interface", + Description: `Start an instance of lotus provider web interface. This creates the 'web' layer if it does not exist, then calls run with that layer.`, Flags: []cli.Flag{ &cli.StringFlag{ diff --git a/cmd/curio/stop.go b/cmd/lotus-provider/stop.go similarity index 91% rename from cmd/curio/stop.go rename to cmd/lotus-provider/stop.go index 5c7bb9880eb..3376d762a46 100644 --- a/cmd/curio/stop.go +++ b/cmd/lotus-provider/stop.go @@ -10,7 +10,7 @@ import ( var stopCmd = &cli.Command{ Name: "stop", - Usage: "Stop a running Curio process", + Usage: "Stop a running lotus provider", Flags: []cli.Flag{}, Action: func(cctx *cli.Context) error { api, closer, err := lcli.GetAPI(cctx) diff --git a/cmd/curio/storage.go b/cmd/lotus-provider/storage.go similarity index 97% rename from cmd/curio/storage.go rename to cmd/lotus-provider/storage.go index 7b57e94385f..987501816dd 100644 --- a/cmd/curio/storage.go +++ b/cmd/lotus-provider/storage.go @@ -23,7 +23,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/cmd/curio/rpc" + "github.com/filecoin-project/lotus/cmd/lotus-provider/rpc" "github.com/filecoin-project/lotus/storage/sealer/fsutil" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) @@ -104,7 +104,7 @@ over time }, }, Action: func(cctx *cli.Context) error { - minerApi, closer, err := rpc.GetCurioAPI(cctx) + minerApi, closer, err := rpc.GetProviderAPI(cctx) if err != nil { return err } @@ -182,7 +182,7 @@ var storageDetachCmd = &cli.Command{ }, ArgsUsage: "[path]", Action: func(cctx *cli.Context) error { - minerApi, closer, err := rpc.GetCurioAPI(cctx) + minerApi, closer, err := rpc.GetProviderAPI(cctx) if err != nil { return err } @@ -213,7 +213,7 @@ var storageListCmd = &cli.Command{ //storageListSectorsCmd, }, Action: func(cctx *cli.Context) error { - minerApi, closer, err := rpc.GetCurioAPI(cctx) + minerApi, closer, err := rpc.GetProviderAPI(cctx) if err != nil { return err } @@ -412,7 +412,7 @@ var storageFindCmd = &cli.Command{ Usage: "find sector in the storage system", ArgsUsage: "[miner address] [sector number]", Action: func(cctx *cli.Context) error { - minerApi, closer, err := rpc.GetCurioAPI(cctx) + minerApi, closer, err := rpc.GetProviderAPI(cctx) if err != nil { return err } diff --git a/cmd/curio/tasks/tasks.go b/cmd/lotus-provider/tasks/tasks.go similarity index 58% rename from cmd/curio/tasks/tasks.go rename to cmd/lotus-provider/tasks/tasks.go index a35d3d2a568..6ecd680d0e4 100644 --- a/cmd/curio/tasks/tasks.go +++ b/cmd/lotus-provider/tasks/tasks.go @@ -1,4 +1,4 @@ -// Package tasks contains tasks that can be run by the curio command. +// Package tasks contains tasks that can be run by the lotus-provider command. package tasks import ( @@ -8,21 +8,18 @@ import ( "github.com/samber/lo" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/cmd/curio/deps" - curio "github.com/filecoin-project/lotus/curiosrc" - "github.com/filecoin-project/lotus/curiosrc/chainsched" - "github.com/filecoin-project/lotus/curiosrc/ffi" - "github.com/filecoin-project/lotus/curiosrc/message" - "github.com/filecoin-project/lotus/curiosrc/piece" - "github.com/filecoin-project/lotus/curiosrc/seal" - "github.com/filecoin-project/lotus/curiosrc/winning" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" - "github.com/filecoin-project/lotus/lib/lazy" - "github.com/filecoin-project/lotus/lib/must" "github.com/filecoin-project/lotus/node/modules" + "github.com/filecoin-project/lotus/provider" + "github.com/filecoin-project/lotus/provider/chainsched" + "github.com/filecoin-project/lotus/provider/lpffi" + "github.com/filecoin-project/lotus/provider/lpmessage" + "github.com/filecoin-project/lotus/provider/lpseal" + "github.com/filecoin-project/lotus/provider/lpwinning" ) -var log = logging.Logger("curio/deps") +var log = logging.Logger("lotus-provider/deps") func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.TaskEngine, error) { cfg := dependencies.Cfg @@ -37,7 +34,7 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task si := dependencies.Si var activeTasks []harmonytask.TaskInterface - sender, sendTask := message.NewSender(full, full, db) + sender, sendTask := lpmessage.NewSender(full, full, db) activeTasks = append(activeTasks, sendTask) chainSched := chainsched.New(full) @@ -51,10 +48,8 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task // PoSt if cfg.Subsystems.EnableWindowPost { - wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := curio.WindowPostScheduler( - ctx, cfg.Fees, cfg.Proving, full, verif, lw, sender, chainSched, - as, maddrs, db, stor, si, cfg.Subsystems.WindowPostMaxTasks) - + wdPostTask, wdPoStSubmitTask, derlareRecoverTask, err := provider.WindowPostScheduler(ctx, cfg.Fees, cfg.Proving, full, verif, lw, sender, + chainSched, as, maddrs, db, stor, si, cfg.Subsystems.WindowPostMaxTasks) if err != nil { return nil, err } @@ -63,25 +58,12 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task } if cfg.Subsystems.EnableWinningPost { - winPoStTask := winning.NewWinPostTask(cfg.Subsystems.WinningPostMaxTasks, db, lw, verif, full, maddrs) + winPoStTask := lpwinning.NewWinPostTask(cfg.Subsystems.WinningPostMaxTasks, db, lw, verif, full, maddrs) activeTasks = append(activeTasks, winPoStTask) needProofParams = true } } - slrLazy := lazy.MakeLazy(func() (*ffi.SealCalls, error) { - return ffi.NewSealCalls(stor, lstor, si), nil - }) - - { - // Piece handling - if cfg.Subsystems.EnableParkPiece { - parkPieceTask := piece.NewParkPieceTask(db, must.One(slrLazy.Val()), cfg.Subsystems.ParkPieceMaxTasks) - cleanupPieceTask := piece.NewCleanupPieceTask(db, must.One(slrLazy.Val()), 0) - activeTasks = append(activeTasks, parkPieceTask, cleanupPieceTask) - } - } - hasAnySealingTask := cfg.Subsystems.EnableSealSDR || cfg.Subsystems.EnableSealSDRTrees || cfg.Subsystems.EnableSendPrecommitMsg || @@ -91,40 +73,40 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task { // Sealing - var sp *seal.SealPoller - var slr *ffi.SealCalls + var sp *lpseal.SealPoller + var slr *lpffi.SealCalls if hasAnySealingTask { - sp = seal.NewPoller(db, full) + sp = lpseal.NewPoller(db, full) go sp.RunPoller(ctx) - slr = must.One(slrLazy.Val()) + slr = lpffi.NewSealCalls(stor, lstor, si) } // NOTE: Tasks with the LEAST priority are at the top if cfg.Subsystems.EnableSealSDR { - sdrTask := seal.NewSDRTask(full, db, sp, slr, cfg.Subsystems.SealSDRMaxTasks) + sdrTask := lpseal.NewSDRTask(full, db, sp, slr, cfg.Subsystems.SealSDRMaxTasks) activeTasks = append(activeTasks, sdrTask) } if cfg.Subsystems.EnableSealSDRTrees { - treesTask := seal.NewTreesTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks) - finalizeTask := seal.NewFinalizeTask(cfg.Subsystems.FinalizeMaxTasks, sp, slr, db) + treesTask := lpseal.NewTreesTask(sp, db, slr, cfg.Subsystems.SealSDRTreesMaxTasks) + finalizeTask := lpseal.NewFinalizeTask(cfg.Subsystems.FinalizeMaxTasks, sp, slr, db) activeTasks = append(activeTasks, treesTask, finalizeTask) } if cfg.Subsystems.EnableSendPrecommitMsg { - precommitTask := seal.NewSubmitPrecommitTask(sp, db, full, sender, as, cfg.Fees.MaxPreCommitGasFee) + precommitTask := lpseal.NewSubmitPrecommitTask(sp, db, full, sender, as, cfg.Fees.MaxPreCommitGasFee) activeTasks = append(activeTasks, precommitTask) } if cfg.Subsystems.EnablePoRepProof { - porepTask := seal.NewPoRepTask(db, full, sp, slr, cfg.Subsystems.PoRepProofMaxTasks) + porepTask := lpseal.NewPoRepTask(db, full, sp, slr, cfg.Subsystems.PoRepProofMaxTasks) activeTasks = append(activeTasks, porepTask) needProofParams = true } if cfg.Subsystems.EnableMoveStorage { - moveStorageTask := seal.NewMoveStorageTask(sp, slr, db, cfg.Subsystems.MoveStorageMaxTasks) + moveStorageTask := lpseal.NewMoveStorageTask(sp, slr, db, cfg.Subsystems.MoveStorageMaxTasks) activeTasks = append(activeTasks, moveStorageTask) } if cfg.Subsystems.EnableSendCommitMsg { - commitTask := seal.NewSubmitCommitTask(sp, db, full, sender, as, cfg.Fees.MaxCommitGasFee) + commitTask := lpseal.NewSubmitCommitTask(sp, db, full, sender, as, cfg.Fees.MaxCommitGasFee) activeTasks = append(activeTasks, commitTask) } } @@ -152,7 +134,7 @@ func StartTasks(ctx context.Context, dependencies *deps.Deps) (*harmonytask.Task } if hasAnySealingTask { - watcher, err := message.NewMessageWatcher(db, ht, chainSched, full) + watcher, err := lpmessage.NewMessageWatcher(db, ht, chainSched, full) if err != nil { return nil, err } diff --git a/cmd/lotus-shed/indexes.go b/cmd/lotus-shed/indexes.go index 12ebe0082b5..620933e25f8 100644 --- a/cmd/lotus-shed/indexes.go +++ b/cmd/lotus-shed/indexes.go @@ -72,7 +72,7 @@ var backfillEventsCmd = &cli.Command{ } if cctx.IsSet("from") { // we need to fetch the tipset after the epoch being specified since we will need to advance currTs - currTs, err = api.ChainGetTipSetAfterHeight(ctx, abi.ChainEpoch(cctx.Int("from")+1), currTs.Key()) + currTs, err = api.ChainGetTipSetByHeight(ctx, abi.ChainEpoch(cctx.Int("from")+1), currTs.Key()) if err != nil { return err } diff --git a/cmd/lotus-shed/deal.go b/cmd/lotus-shed/lpdeal.go similarity index 78% rename from cmd/lotus-shed/deal.go rename to cmd/lotus-shed/lpdeal.go index ba6979a140b..01f886015c9 100644 --- a/cmd/lotus-shed/deal.go +++ b/cmd/lotus-shed/lpdeal.go @@ -14,8 +14,7 @@ import ( "time" "github.com/fatih/color" - "github.com/google/uuid" - "github.com/jackc/pgx/v5" + "github.com/ipfs/go-cid" "github.com/mitchellh/go-homedir" manet "github.com/multiformats/go-multiaddr/net" "github.com/urfave/cli/v2" @@ -35,14 +34,13 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/types" lcli "github.com/filecoin-project/lotus/cli" - "github.com/filecoin-project/lotus/cmd/curio/deps" - cumarket "github.com/filecoin-project/lotus/curiosrc/market" - "github.com/filecoin-project/lotus/curiosrc/market/fakelm" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/lib/must" "github.com/filecoin-project/lotus/lib/nullreader" "github.com/filecoin-project/lotus/metrics/proxy" "github.com/filecoin-project/lotus/node" + "github.com/filecoin-project/lotus/provider/lpmarket" + "github.com/filecoin-project/lotus/provider/lpmarket/fakelm" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) @@ -90,7 +88,7 @@ var lpUtilStartDealCmd = &cli.Command{ } // open rpc - var rpc api.CurioStruct + var rpc api.LotusProviderStruct closer2, err := jsonrpc.NewMergeClient(ctx, cctx.String("provider-rpc"), "Filecoin", []interface{}{&rpc.Internal}, nil) if err != nil { return xerrors.Errorf("open rpc: %w", err) @@ -370,7 +368,7 @@ var lpBoostProxyCmd = &cli.Command{ defer closer() - pin := cumarket.NewPieceIngester(db, full) + pin := lpmarket.NewPieceIngester(db, full) si := paths.NewDBIndex(nil, db) @@ -429,7 +427,7 @@ var lpBoostProxyCmd = &cli.Command{ } pieceInfoLk := new(sync.Mutex) - pieceInfos := map[uuid.UUID][]pieceInfo{} + pieceInfos := map[cid.Cid][]pieceInfo{} ast.Internal.SectorAddPieceToAny = func(ctx context.Context, pieceSize abi.UnpaddedPieceSize, pieceData storiface.Data, deal api.PieceDealInfo) (api.SectorOffset, error) { origPieceData := pieceData @@ -451,103 +449,25 @@ var lpBoostProxyCmd = &cli.Command{ done: make(chan struct{}), } - pieceUUID := uuid.New() - - color.Blue("%s %s piece assign request with id %s", deal.DealProposal.PieceCID, deal.DealProposal.Provider, pieceUUID) - pieceInfoLk.Lock() - pieceInfos[pieceUUID] = append(pieceInfos[pieceUUID], pi) + pieceInfos[deal.DealProposal.PieceCID] = append(pieceInfos[deal.DealProposal.PieceCID], pi) pieceInfoLk.Unlock() // /piece?piece_cid=xxxx dataUrl := rootUrl dataUrl.Path = "/piece" - dataUrl.RawQuery = "piece_id=" + pieceUUID.String() - - // add piece entry - - var refID int64 - var pieceWasCreated bool - - comm, err := db.BeginTransaction(ctx, func(tx *harmonydb.Tx) (commit bool, err error) { - var pieceID int64 - // Attempt to select the piece ID first - err = tx.QueryRow(`SELECT id FROM parked_pieces WHERE piece_cid = $1`, deal.DealProposal.PieceCID.String()).Scan(&pieceID) - - if err != nil { - if err == pgx.ErrNoRows { - // Piece does not exist, attempt to insert - err = tx.QueryRow(` - INSERT INTO parked_pieces (piece_cid, piece_padded_size, piece_raw_size) - VALUES ($1, $2, $3) - ON CONFLICT (piece_cid) DO NOTHING - RETURNING id`, deal.DealProposal.PieceCID.String(), int64(pieceSize.Padded()), int64(pieceSize)).Scan(&pieceID) - if err != nil { - return false, xerrors.Errorf("inserting new parked piece and getting id: %w", err) - } - pieceWasCreated = true // New piece was created - } else { - // Some other error occurred during select - return false, xerrors.Errorf("checking existing parked piece: %w", err) - } - } else { - pieceWasCreated = false // Piece already exists, no new piece was created - } - - // Add parked_piece_ref - err = tx.QueryRow(`INSERT INTO parked_piece_refs (piece_id, data_url) - VALUES ($1, $2) RETURNING ref_id`, pieceID, dataUrl.String()).Scan(&refID) - if err != nil { - return false, xerrors.Errorf("inserting parked piece ref: %w", err) - } - - // If everything went well, commit the transaction - return true, nil // This will commit the transaction - }, harmonydb.OptionRetry()) - if err != nil { - return api.SectorOffset{}, xerrors.Errorf("inserting parked piece: %w", err) - } - if !comm { - return api.SectorOffset{}, xerrors.Errorf("piece tx didn't commit") - } - - // wait for piece to be parked - if pieceWasCreated { - <-pi.done - } else { - // If the piece was not created, we need to close the done channel - close(pi.done) - - go func() { - // close the data reader (drain to eof if it's not a closer) - if closer, ok := pieceData.(io.Closer); ok { - if err := closer.Close(); err != nil { - log.Warnw("closing pieceData in DataCid", "error", err) - } - } else { - log.Warnw("pieceData is not an io.Closer", "type", fmt.Sprintf("%T", pieceData)) - - _, err := io.Copy(io.Discard, pieceData) - if err != nil { - log.Warnw("draining pieceData in DataCid", "error", err) - } - } - }() - } - - pieceIDUrl := url.URL{ - Scheme: "pieceref", - Opaque: fmt.Sprintf("%d", refID), - } + dataUrl.RawQuery = "piece_cid=" + deal.DealProposal.PieceCID.String() // make a sector - so, err := pin.AllocatePieceToSector(ctx, maddr, deal, int64(pieceSize), pieceIDUrl, nil) + so, err := pin.AllocatePieceToSector(ctx, maddr, deal, int64(pieceSize), dataUrl, nil) if err != nil { return api.SectorOffset{}, err } color.Blue("%s piece assigned to sector f0%d:%d @ %d", deal.DealProposal.PieceCID, mid, so.Sector, so.Offset) + <-pi.done + return so, nil } @@ -564,12 +484,10 @@ var lpBoostProxyCmd = &cli.Command{ ast.Internal.StorageGetLocks = si.StorageGetLocks var pieceHandler http.HandlerFunc = func(w http.ResponseWriter, r *http.Request) { - // /piece?piece_id=xxxx - pieceUUID := r.URL.Query().Get("piece_id") - - pu, err := uuid.Parse(pieceUUID) + // /piece?piece_cid=xxxx + pieceCid, err := cid.Decode(r.URL.Query().Get("piece_cid")) if err != nil { - http.Error(w, "bad piece id", http.StatusBadRequest) + http.Error(w, "bad piece_cid", http.StatusBadRequest) return } @@ -578,13 +496,13 @@ var lpBoostProxyCmd = &cli.Command{ return } - fmt.Printf("%s request for piece from %s\n", pieceUUID, r.RemoteAddr) + fmt.Printf("%s request for piece from %s\n", pieceCid, r.RemoteAddr) pieceInfoLk.Lock() - pis, ok := pieceInfos[pu] + pis, ok := pieceInfos[pieceCid] if !ok { http.Error(w, "piece not found", http.StatusNotFound) - color.Red("%s not found", pu) + color.Red("%s not found", pieceCid) pieceInfoLk.Unlock() return } @@ -593,10 +511,7 @@ var lpBoostProxyCmd = &cli.Command{ pi := pis[0] pis = pis[1:] - pieceInfos[pu] = pis - if len(pis) == 0 { - delete(pieceInfos, pu) - } + pieceInfos[pieceCid] = pis pieceInfoLk.Unlock() @@ -618,7 +533,7 @@ var lpBoostProxyCmd = &cli.Command{ return } - color.Green("%s served %.3f MiB in %s (%.2f MiB/s)", pu, float64(n)/(1024*1024), took, mbps) + color.Green("%s served %.3f MiB in %s (%.2f MiB/s)", pieceCid, float64(n)/(1024*1024), took, mbps) } finalApi := proxy.LoggingAPI[api.StorageMiner, api.StorageMinerStruct](&ast) diff --git a/cmd/lotus-sim/simulation/simulation.go b/cmd/lotus-sim/simulation/simulation.go index d73a033cf96..47d06aeda91 100644 --- a/cmd/lotus-sim/simulation/simulation.go +++ b/cmd/lotus-sim/simulation/simulation.go @@ -117,7 +117,7 @@ func (sim *Simulation) saveConfig() error { var simulationPrefix = datastore.NewKey("/simulation") -// key returns the key in the form /simulation//. For example, +// key returns the the key in the form /simulation//. For example, // /simulation/head/default. func (sim *Simulation) key(subkey string) datastore.Key { return simulationPrefix.ChildString(subkey).ChildString(sim.name) diff --git a/conformance/driver.go b/conformance/driver.go index d4f46942c95..3c62ca7b9ef 100644 --- a/conformance/driver.go +++ b/conformance/driver.go @@ -100,7 +100,7 @@ type ExecuteTipsetParams struct { // ExecuteTipset executes the supplied tipset on top of the state represented // by the preroot CID. // -// This method returns the receipts root, the poststate root, and the VM +// This method returns the the receipts root, the poststate root, and the VM // message results. The latter _include_ implicit messages, such as cron ticks // and reward withdrawal per miner. func (d *Driver) ExecuteTipset(bs blockstore.Blockstore, ds ds.Batching, params ExecuteTipsetParams) (*ExecuteTipsetResult, error) { diff --git a/curiosrc/builder.go b/curiosrc/builder.go deleted file mode 100644 index 3a3294a2930..00000000000 --- a/curiosrc/builder.go +++ /dev/null @@ -1,46 +0,0 @@ -package curio - -import ( - "context" - "time" - - "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/curiosrc/chainsched" - "github.com/filecoin-project/lotus/curiosrc/message" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" - "github.com/filecoin-project/lotus/curiosrc/window" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/node/config" - dtypes "github.com/filecoin-project/lotus/node/modules/dtypes" - "github.com/filecoin-project/lotus/storage/paths" - "github.com/filecoin-project/lotus/storage/sealer" - "github.com/filecoin-project/lotus/storage/sealer/storiface" -) - -//var log = logging.Logger("provider") - -func WindowPostScheduler(ctx context.Context, fc config.CurioFees, pc config.ProvingConfig, - api api.FullNode, verif storiface.Verifier, lw *sealer.LocalWorker, sender *message.Sender, chainSched *chainsched.CurioChainSched, - as *multictladdr.MultiAddressSelector, addresses map[dtypes.MinerAddress]bool, db *harmonydb.DB, - stor paths.Store, idx paths.SectorIndex, max int) (*window.WdPostTask, *window.WdPostSubmitTask, *window.WdPostRecoverDeclareTask, error) { - - // todo config - ft := window.NewSimpleFaultTracker(stor, idx, pc.ParallelCheckLimit, time.Duration(pc.SingleCheckTimeout), time.Duration(pc.PartitionCheckTimeout)) - - computeTask, err := window.NewWdPostTask(db, api, ft, lw, verif, chainSched, addresses, max) - if err != nil { - return nil, nil, nil, err - } - - submitTask, err := window.NewWdPostSubmitTask(chainSched, sender, db, api, fc.MaxWindowPoStGasFee, as) - if err != nil { - return nil, nil, nil, err - } - - recoverTask, err := window.NewWdPostRecoverDeclareTask(sender, db, api, ft, as, chainSched, fc.MaxWindowPoStGasFee, addresses) - if err != nil { - return nil, nil, nil, err - } - - return computeTask, submitTask, recoverTask, nil -} diff --git a/curiosrc/ffi/piece_funcs.go b/curiosrc/ffi/piece_funcs.go deleted file mode 100644 index 9bf4a504b8e..00000000000 --- a/curiosrc/ffi/piece_funcs.go +++ /dev/null @@ -1,75 +0,0 @@ -package ffi - -import ( - "context" - "io" - "os" - "time" - - "golang.org/x/xerrors" - - "github.com/filecoin-project/lotus/storage/sealer/storiface" -) - -func (sb *SealCalls) WritePiece(ctx context.Context, pieceID storiface.PieceNumber, size int64, data io.Reader) error { - // todo: config(?): allow setting PathStorage for this - // todo storage reservations - paths, done, err := sb.sectors.AcquireSector(ctx, nil, pieceID.Ref(), storiface.FTNone, storiface.FTPiece, storiface.PathSealing) - if err != nil { - return err - } - defer done() - - dest := paths.Piece - tempDest := dest + ".tmp" - - destFile, err := os.OpenFile(tempDest, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644) - if err != nil { - return xerrors.Errorf("creating temp piece file '%s': %w", tempDest, err) - } - - removeTemp := true - defer func() { - if removeTemp { - rerr := os.Remove(tempDest) - if rerr != nil { - log.Errorf("removing temp file: %+v", rerr) - } - } - }() - - copyStart := time.Now() - - n, err := io.CopyBuffer(destFile, io.LimitReader(data, size), make([]byte, 8<<20)) - if err != nil { - _ = destFile.Close() - return xerrors.Errorf("copying piece data: %w", err) - } - - if err := destFile.Close(); err != nil { - return xerrors.Errorf("closing temp piece file: %w", err) - } - - if n != size { - return xerrors.Errorf("short write: %d", n) - } - - copyEnd := time.Now() - - log.Infow("wrote parked piece", "piece", pieceID, "size", size, "duration", copyEnd.Sub(copyStart), "dest", dest, "MiB/s", float64(size)/(1<<20)/copyEnd.Sub(copyStart).Seconds()) - - if err := os.Rename(tempDest, dest); err != nil { - return xerrors.Errorf("rename temp piece to dest %s -> %s: %w", tempDest, dest, err) - } - - removeTemp = false - return nil -} - -func (sb *SealCalls) PieceReader(ctx context.Context, id storiface.PieceNumber) (io.ReadCloser, error) { - return sb.sectors.storage.ReaderSeq(ctx, id.Ref(), storiface.FTPiece) -} - -func (sb *SealCalls) RemovePiece(ctx context.Context, id storiface.PieceNumber) error { - return sb.sectors.storage.Remove(ctx, id.Ref().ID, storiface.FTPiece, true, nil) -} diff --git a/curiosrc/piece/task_cleanup_piece.go b/curiosrc/piece/task_cleanup_piece.go deleted file mode 100644 index ed22ccb46d3..00000000000 --- a/curiosrc/piece/task_cleanup_piece.go +++ /dev/null @@ -1,130 +0,0 @@ -package piece - -import ( - "context" - "time" - - "golang.org/x/xerrors" - - "github.com/filecoin-project/lotus/curiosrc/ffi" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/lib/harmony/harmonytask" - "github.com/filecoin-project/lotus/lib/harmony/resources" - "github.com/filecoin-project/lotus/lib/promise" - "github.com/filecoin-project/lotus/storage/sealer/storiface" -) - -type CleanupPieceTask struct { - max int - db *harmonydb.DB - sc *ffi.SealCalls - - TF promise.Promise[harmonytask.AddTaskFunc] -} - -func NewCleanupPieceTask(db *harmonydb.DB, sc *ffi.SealCalls, max int) *CleanupPieceTask { - pt := &CleanupPieceTask{ - db: db, - sc: sc, - - max: max, - } - go pt.pollCleanupTasks(context.Background()) - return pt -} - -func (c *CleanupPieceTask) pollCleanupTasks(ctx context.Context) { - for { - // select pieces with no refs and null cleanup_task_id - var pieceIDs []struct { - ID storiface.PieceNumber `db:"id"` - } - - err := c.db.Select(ctx, &pieceIDs, `SELECT id FROM parked_pieces WHERE cleanup_task_id IS NULL AND (SELECT count(*) FROM parked_piece_refs WHERE piece_id = parked_pieces.id) = 0`) - if err != nil { - log.Errorf("failed to get parked pieces: %s", err) - time.Sleep(PieceParkPollInterval) - continue - } - - if len(pieceIDs) == 0 { - time.Sleep(PieceParkPollInterval) - continue - } - - for _, pieceID := range pieceIDs { - pieceID := pieceID - - // create a task for each piece - c.TF.Val(ctx)(func(id harmonytask.TaskID, tx *harmonydb.Tx) (shouldCommit bool, err error) { - // update - n, err := tx.Exec(`UPDATE parked_pieces SET cleanup_task_id = $1 WHERE id = $2 AND (SELECT count(*) FROM parked_piece_refs WHERE piece_id = parked_pieces.id) = 0`, id, pieceID.ID) - if err != nil { - return false, xerrors.Errorf("updating parked piece: %w", err) - } - - // commit only if we updated the piece - return n > 0, nil - }) - } - } -} - -func (c *CleanupPieceTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error) { - ctx := context.Background() - - // select by cleanup_task_id - var pieceID int64 - - err = c.db.QueryRow(ctx, "SELECT id FROM parked_pieces WHERE cleanup_task_id = $1", taskID).Scan(&pieceID) - if err != nil { - return false, xerrors.Errorf("query parked_piece: %w", err) - } - - // delete from parked_pieces where id = $1 where ref count = 0 - // note: we delete from the db first because that guarantees that the piece is no longer in use - // if storage delete fails, it will be retried later is other cleanup tasks - n, err := c.db.Exec(ctx, "DELETE FROM parked_pieces WHERE id = $1 AND (SELECT count(*) FROM parked_piece_refs WHERE piece_id = $1) = 0", pieceID) - if err != nil { - return false, xerrors.Errorf("delete parked_piece: %w", err) - } - - if n == 0 { - return true, nil - } - - // remove from storage - err = c.sc.RemovePiece(ctx, storiface.PieceNumber(pieceID)) - if err != nil { - log.Errorw("remove piece", "piece_id", pieceID, "error", err) - } - - return true, nil -} - -func (c *CleanupPieceTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error) { - // the remove call runs on paths.Remote storage, so it doesn't really matter where it runs - - id := ids[0] - return &id, nil -} - -func (c *CleanupPieceTask) TypeDetails() harmonytask.TaskTypeDetails { - return harmonytask.TaskTypeDetails{ - Max: c.max, - Name: "DropPiece", - Cost: resources.Resources{ - Cpu: 1, - Gpu: 0, - Ram: 64 << 20, - Storage: nil, - }, - MaxFailures: 10, - } -} - -func (c *CleanupPieceTask) Adder(taskFunc harmonytask.AddTaskFunc) { - c.TF.Set(taskFunc) -} - -var _ harmonytask.TaskInterface = &CleanupPieceTask{} diff --git a/curiosrc/piece/task_park_piece.go b/curiosrc/piece/task_park_piece.go deleted file mode 100644 index c8972fdafd3..00000000000 --- a/curiosrc/piece/task_park_piece.go +++ /dev/null @@ -1,220 +0,0 @@ -package piece - -import ( - "context" - "encoding/json" - "strconv" - "time" - - logging "github.com/ipfs/go-log/v2" - "golang.org/x/xerrors" - - "github.com/filecoin-project/lotus/curiosrc/ffi" - "github.com/filecoin-project/lotus/curiosrc/seal" - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" - "github.com/filecoin-project/lotus/lib/harmony/harmonytask" - "github.com/filecoin-project/lotus/lib/harmony/resources" - "github.com/filecoin-project/lotus/lib/promise" - "github.com/filecoin-project/lotus/storage/sealer/storiface" -) - -var log = logging.Logger("lppiece") -var PieceParkPollInterval = time.Second * 15 - -// ParkPieceTask gets a piece from some origin, and parks it in storage -// Pieces are always f00, piece ID is mapped to pieceCID in the DB -type ParkPieceTask struct { - db *harmonydb.DB - sc *ffi.SealCalls - - TF promise.Promise[harmonytask.AddTaskFunc] - - max int -} - -func NewParkPieceTask(db *harmonydb.DB, sc *ffi.SealCalls, max int) *ParkPieceTask { - pt := &ParkPieceTask{ - db: db, - sc: sc, - - max: max, - } - go pt.pollPieceTasks(context.Background()) - return pt -} - -func (p *ParkPieceTask) pollPieceTasks(ctx context.Context) { - for { - // select parked pieces with no task_id - var pieceIDs []struct { - ID storiface.PieceNumber `db:"id"` - } - - err := p.db.Select(ctx, &pieceIDs, `SELECT id FROM parked_pieces WHERE complete = FALSE AND task_id IS NULL`) - if err != nil { - log.Errorf("failed to get parked pieces: %s", err) - time.Sleep(PieceParkPollInterval) - continue - } - - if len(pieceIDs) == 0 { - time.Sleep(PieceParkPollInterval) - continue - } - - for _, pieceID := range pieceIDs { - pieceID := pieceID - - // create a task for each piece - p.TF.Val(ctx)(func(id harmonytask.TaskID, tx *harmonydb.Tx) (shouldCommit bool, err error) { - // update - n, err := tx.Exec(`UPDATE parked_pieces SET task_id = $1 WHERE id = $2 AND complete = FALSE AND task_id IS NULL`, id, pieceID.ID) - if err != nil { - return false, xerrors.Errorf("updating parked piece: %w", err) - } - - // commit only if we updated the piece - return n > 0, nil - }) - } - } -} - -func (p *ParkPieceTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error) { - ctx := context.Background() - - // Define a struct to hold piece data. - var piecesData []struct { - PieceID int64 `db:"id"` - PieceCreatedAt time.Time `db:"created_at"` - PieceCID string `db:"piece_cid"` - Complete bool `db:"complete"` - PiecePaddedSize int64 `db:"piece_padded_size"` - PieceRawSize string `db:"piece_raw_size"` - } - - // Select the piece data using the task ID. - err = p.db.Select(ctx, &piecesData, ` - SELECT id, created_at, piece_cid, complete, piece_padded_size, piece_raw_size - FROM parked_pieces - WHERE task_id = $1 - `, taskID) - if err != nil { - return false, xerrors.Errorf("fetching piece data: %w", err) - } - - if len(piecesData) == 0 { - return false, xerrors.Errorf("no piece data found for task_id: %d", taskID) - } - - pieceData := piecesData[0] - - if pieceData.Complete { - log.Warnw("park piece task already complete", "task_id", taskID, "piece_cid", pieceData.PieceCID) - return true, nil - } - - // Define a struct for reference data. - var refData []struct { - DataURL string `db:"data_url"` - DataHeaders json.RawMessage `db:"data_headers"` - } - - // Now, select the first reference data that has a URL. - err = p.db.Select(ctx, &refData, ` - SELECT data_url, data_headers - FROM parked_piece_refs - WHERE piece_id = $1 AND data_url IS NOT NULL - LIMIT 1 - `, pieceData.PieceID) - if err != nil { - return false, xerrors.Errorf("fetching reference data: %w", err) - } - - if len(refData) == 0 { - return false, xerrors.Errorf("no refs found for piece_id: %d", pieceData.PieceID) - } - - // Convert piece_raw_size from string to int64. - pieceRawSize, err := strconv.ParseInt(pieceData.PieceRawSize, 10, 64) - if err != nil { - return false, xerrors.Errorf("parsing piece raw size: %w", err) - } - - if refData[0].DataURL != "" { - upr := &seal.UrlPieceReader{ - Url: refData[0].DataURL, - RawSize: pieceRawSize, - } - defer func() { - _ = upr.Close() - }() - - pnum := storiface.PieceNumber(pieceData.PieceID) - - if err := p.sc.WritePiece(ctx, pnum, pieceRawSize, upr); err != nil { - return false, xerrors.Errorf("write piece: %w", err) - } - - // Update the piece as complete after a successful write. - _, err = p.db.Exec(ctx, `UPDATE parked_pieces SET complete = TRUE WHERE id = $1`, pieceData.PieceID) - if err != nil { - return false, xerrors.Errorf("marking piece as complete: %w", err) - } - - return true, nil - } - - // If no URL is found, this indicates an issue since at least one URL is expected. - return false, xerrors.Errorf("no data URL found for piece_id: %d", pieceData.PieceID) -} - -func (p *ParkPieceTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error) { - id := ids[0] - return &id, nil -} - -func (p *ParkPieceTask) TypeDetails() harmonytask.TaskTypeDetails { - const maxSizePiece = 64 << 30 - - return harmonytask.TaskTypeDetails{ - Max: p.max, - Name: "ParkPiece", - Cost: resources.Resources{ - Cpu: 1, - Gpu: 0, - Ram: 64 << 20, - Storage: p.sc.Storage(p.taskToRef, storiface.FTPiece, storiface.FTNone, maxSizePiece, storiface.PathSealing), - }, - MaxFailures: 10, - } -} - -func (p *ParkPieceTask) taskToRef(id harmonytask.TaskID) (ffi.SectorRef, error) { - var pieceIDs []struct { - ID storiface.PieceNumber `db:"id"` - } - - err := p.db.Select(context.Background(), &pieceIDs, `SELECT id FROM parked_pieces WHERE task_id = $1`, id) - if err != nil { - return ffi.SectorRef{}, xerrors.Errorf("getting piece id: %w", err) - } - - if len(pieceIDs) != 1 { - return ffi.SectorRef{}, xerrors.Errorf("expected 1 piece id, got %d", len(pieceIDs)) - } - - pref := pieceIDs[0].ID.Ref() - - return ffi.SectorRef{ - SpID: int64(pref.ID.Miner), - SectorNumber: int64(pref.ID.Number), - RegSealProof: pref.ProofType, - }, nil -} - -func (p *ParkPieceTask) Adder(taskFunc harmonytask.AddTaskFunc) { - p.TF.Set(taskFunc) -} - -var _ harmonytask.TaskInterface = &ParkPieceTask{} diff --git a/curiosrc/seal/finalize_pieces.go b/curiosrc/seal/finalize_pieces.go deleted file mode 100644 index 354eed1413e..00000000000 --- a/curiosrc/seal/finalize_pieces.go +++ /dev/null @@ -1,51 +0,0 @@ -package seal - -import ( - "context" - "net/url" - "strconv" - - "golang.org/x/xerrors" - - "github.com/filecoin-project/go-state-types/abi" - - "github.com/filecoin-project/lotus/lib/harmony/harmonydb" -) - -func DropSectorPieceRefs(ctx context.Context, db *harmonydb.DB, sid abi.SectorID) error { - //_, err := db.Exec(ctx, `SELECT FROM sectors_sdr_initial_pieces WHERE sp_id = $1 AND sector_number = $2`, sid.Miner, sid.Number) - - var PieceURL []struct { - URL string `db:"data_url"` - } - - err := db.Select(ctx, &PieceURL, `SELECT data_url FROM sectors_sdr_initial_pieces WHERE sp_id = $1 AND sector_number = $2`, sid.Miner, sid.Number) - if err != nil { - return xerrors.Errorf("getting piece url: %w", err) - } - - for _, pu := range PieceURL { - gourl, err := url.Parse(pu.URL) - if err != nil { - log.Errorw("failed to parse piece url", "url", pu.URL, "error", err, "miner", sid.Miner, "sector", sid.Number) - continue - } - - if gourl.Scheme == "pieceref" { - refID, err := strconv.ParseInt(gourl.Opaque, 10, 64) - if err != nil { - log.Errorw("failed to parse piece ref id", "url", pu.URL, "error", err, "miner", sid.Miner, "sector", sid.Number) - continue - } - - n, err := db.Exec(ctx, `DELETE FROM parked_piece_refs WHERE ref_id = $1`, refID) - if err != nil { - log.Errorw("failed to delete piece ref", "url", pu.URL, "error", err, "miner", sid.Miner, "sector", sid.Number) - } - - log.Debugw("deleted piece ref", "url", pu.URL, "miner", sid.Miner, "sector", sid.Number, "rows", n) - } - } - - return err -} diff --git a/curiosrc/web/api/routes.go b/curiosrc/web/api/routes.go deleted file mode 100644 index c030f7d531e..00000000000 --- a/curiosrc/web/api/routes.go +++ /dev/null @@ -1,13 +0,0 @@ -// Package api provides the HTTP API for the lotus curio web gui. -package api - -import ( - "github.com/gorilla/mux" - - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/curiosrc/web/api/debug" -) - -func Routes(r *mux.Router, deps *deps.Deps) { - debug.Routes(r.PathPrefix("/debug").Subrouter(), deps) -} diff --git a/curiosrc/web/hapi/web/cluster_machines.gohtml b/curiosrc/web/hapi/web/cluster_machines.gohtml deleted file mode 100644 index b253a05610e..00000000000 --- a/curiosrc/web/hapi/web/cluster_machines.gohtml +++ /dev/null @@ -1,12 +0,0 @@ -{{define "cluster_machines"}} -{{range .}} - - {{.Address}} - {{.ID}} - {{.SinceContact}} - {{range .RecentTasks}} - {{.TaskName}}:{{.Success}}{{if ne 0 .Fail}}({{.Fail}}){{end}} - {{end}} - -{{end}} -{{end}} diff --git a/documentation/en/api-v0-methods-miner.md b/documentation/en/api-v0-methods-miner.md index dd2f511db56..b133930bc7c 100644 --- a/documentation/en/api-v0-methods-miner.md +++ b/documentation/en/api-v0-methods-miner.md @@ -3954,7 +3954,6 @@ Response: 0, 1, 0, - 0, 0 ], "Read": [ @@ -3962,7 +3961,6 @@ Response: 3, 0, 0, - 0, 0 ] } diff --git a/documentation/en/api-v0-methods-curio.md b/documentation/en/api-v0-methods-provider.md similarity index 99% rename from documentation/en/api-v0-methods-curio.md rename to documentation/en/api-v0-methods-provider.md index 84cc2059527..a1ccc17c24b 100644 --- a/documentation/en/api-v0-methods-curio.md +++ b/documentation/en/api-v0-methods-provider.md @@ -16,7 +16,6 @@ ### Shutdown -Trigger shutdown Perms: admin diff --git a/documentation/en/api-v1-unstable-methods.md b/documentation/en/api-v1-unstable-methods.md index dee290b343e..287cfce5374 100644 --- a/documentation/en/api-v1-unstable-methods.md +++ b/documentation/en/api-v1-unstable-methods.md @@ -116,7 +116,7 @@ * [GasEstimateGasPremium](#GasEstimateGasPremium) * [GasEstimateMessageGas](#GasEstimateMessageGas) * [Get](#Get) - * [GetActorEventsRaw](#GetActorEventsRaw) + * [GetActorEvents](#GetActorEvents) * [I](#I) * [ID](#ID) * [Log](#Log) @@ -282,7 +282,7 @@ * [StateVerifierStatus](#StateVerifierStatus) * [StateWaitMsg](#StateWaitMsg) * [Subscribe](#Subscribe) - * [SubscribeActorEventsRaw](#SubscribeActorEventsRaw) + * [SubscribeActorEvents](#SubscribeActorEvents) * [Sync](#Sync) * [SyncCheckBad](#SyncCheckBad) * [SyncCheckpoint](#SyncCheckpoint) @@ -3386,8 +3386,8 @@ Response: ## Get -### GetActorEventsRaw -GetActorEventsRaw returns all user-programmed and built-in actor events that match the given +### GetActorEvents +GetActorEvents returns all user-programmed and built-in actor events that match the given filter. This is a request/response API. Results available from this API may be limited by the MaxFilterResults and MaxFilterHeightRange @@ -8801,8 +8801,8 @@ Response: ## Subscribe -### SubscribeActorEventsRaw -SubscribeActorEventsRaw returns a long-lived stream of all user-programmed and built-in actor +### SubscribeActorEvents +SubscribeActorEvents returns a long-lived stream of all user-programmed and built-in actor events that match the given filter. Events that match the given filter are written to the stream in real-time as they are emitted from the FVM. diff --git a/documentation/en/cli-curio.md b/documentation/en/cli-lotus-provider.md similarity index 55% rename from documentation/en/cli-curio.md rename to documentation/en/cli-lotus-provider.md index 08ed8ab908e..be3b5ec6ec0 100644 --- a/documentation/en/cli-curio.md +++ b/documentation/en/cli-lotus-provider.md @@ -1,26 +1,24 @@ -# curio +# lotus-provider ``` NAME: - curio - Filecoin decentralized storage network provider + lotus-provider - Filecoin decentralized storage network provider USAGE: - curio [global options] command [command options] [arguments...] + lotus-provider [global options] command [command options] [arguments...] VERSION: 1.27.0-dev COMMANDS: - cli Execute cli commands - run Start a Curio process - stop Stop a running Curio process - config Manage node config by layers. The layer 'base' will always be applied at Curio start-up. - test Utility functions for testing - web Start Curio web interface - guided-setup Run the guided setup for migrating from lotus-miner to Curio - from-miner Express a database config (for curio) from an existing miner. - seal Manage the sealing pipeline - version Print version - help, h Shows a list of commands or help for one command + cli Execute cli commands + run Start a lotus provider process + stop Stop a running lotus provider + config Manage node config by layers. The layer 'base' will always be applied at Curio start-up. + test Utility functions for testing + web Start lotus provider web interface + seal Manage the sealing pipeline + version Print version + help, h Shows a list of commands or help for one command DEVELOPER: auth Manage RPC permissions log Manage logging @@ -29,23 +27,23 @@ COMMANDS: GLOBAL OPTIONS: --color use color in display output (default: depends on output being a TTY) - --db-host value Command separated list of hostnames for yugabyte cluster (default: "yugabyte") [$CURIO_DB_HOST, $CURIO_HARMONYDB_HOSTS] - --db-name value (default: "yugabyte") [$CURIO_DB_NAME, $CURIO_HARMONYDB_NAME] - --db-user value (default: "yugabyte") [$CURIO_DB_USER, $CURIO_HARMONYDB_USERNAME] - --db-password value (default: "yugabyte") [$CURIO_DB_PASSWORD, $CURIO_HARMONYDB_PASSWORD] - --repo-path value (default: "~/.curio") [$CURIO_REPO_PATH] + --db-host value Command separated list of hostnames for yugabyte cluster (default: "yugabyte") [$LOTUS_DB_HOST] + --db-name value (default: "yugabyte") [$LOTUS_DB_NAME, $LOTUS_HARMONYDB_HOSTS] + --db-user value (default: "yugabyte") [$LOTUS_DB_USER, $LOTUS_HARMONYDB_USERNAME] + --db-password value (default: "yugabyte") [$LOTUS_DB_PASSWORD, $LOTUS_HARMONYDB_PASSWORD] + --repo-path value (default: "~/.lotusprovider") [$LOTUS_REPO_PATH] --vv enables very verbose mode, useful for debugging the CLI (default: false) --help, -h show help --version, -v print the version ``` -## curio cli +## lotus-provider cli ``` NAME: - curio cli - Execute cli commands + lotus-provider cli - Execute cli commands USAGE: - curio cli command [command options] [arguments...] + lotus-provider cli command [command options] [arguments...] COMMANDS: storage manage sector storage @@ -56,57 +54,57 @@ OPTIONS: --help, -h show help ``` -### curio cli storage +### lotus-provider cli storage ``` ``` -## curio run +## lotus-provider run ``` NAME: - curio run - Start a Curio process + lotus-provider run - Start a lotus provider process USAGE: - curio run [command options] [arguments...] + lotus-provider run [command options] [arguments...] OPTIONS: --listen value host address and port the worker api will listen on (default: "0.0.0.0:12300") [$LOTUS_WORKER_LISTEN] --nosync don't check full-node sync status (default: false) --manage-fdlimit manage open file limit (default: true) - --storage-json value path to json file containing storage config (default: "~/.curio/storage.json") - --journal value path to journal files (default: "~/.curio/") + --storage-json value path to json file containing storage config (default: "~/.lotus-provider/storage.json") + --journal value path to journal files (default: "~/.lotus-provider/") --layers value [ --layers value ] list of layers to be interpreted (atop defaults). Default: base --help, -h show help ``` -## curio stop +## lotus-provider stop ``` NAME: - curio stop - Stop a running Curio process + lotus-provider stop - Stop a running lotus provider USAGE: - curio stop [command options] [arguments...] + lotus-provider stop [command options] [arguments...] OPTIONS: --help, -h show help ``` -## curio config +## lotus-provider config ``` NAME: - curio config - Manage node config by layers. The layer 'base' will always be applied at Curio start-up. + lotus-provider config - Manage node config by layers. The layer 'base' will always be applied at Curio start-up. USAGE: - curio config command [command options] [arguments...] + lotus-provider config command [command options] [arguments...] COMMANDS: default, defaults Print default node config set, add, update, create Set a config layer or the base by providing a filename or stdin. get, cat, show Get a config layer by name. You may want to pipe the output to a file, or use 'less' list, ls List config layers present in the DB. - interpret, view, stacked, stack Interpret stacked config layers by this version of curio, with system-generated comments. + interpret, view, stacked, stack Interpret stacked config layers by this version of lotus-provider, with system-generated comments. remove, rm, del, delete Remove a named config layer. edit edit a config layer - from-miner Express a database config (for curio) from an existing miner. + from-miner Express a database config (for lotus-provider) from an existing miner. new-cluster Create new configuration for a new cluster help, h Shows a list of commands or help for one command @@ -114,88 +112,88 @@ OPTIONS: --help, -h show help ``` -### curio config default +### lotus-provider config default ``` NAME: - curio config default - Print default node config + lotus-provider config default - Print default node config USAGE: - curio config default [command options] [arguments...] + lotus-provider config default [command options] [arguments...] OPTIONS: --no-comment don't comment default values (default: false) --help, -h show help ``` -### curio config set +### lotus-provider config set ``` NAME: - curio config set - Set a config layer or the base by providing a filename or stdin. + lotus-provider config set - Set a config layer or the base by providing a filename or stdin. USAGE: - curio config set [command options] a layer's file name + lotus-provider config set [command options] a layer's file name OPTIONS: --title value title of the config layer (req'd for stdin) --help, -h show help ``` -### curio config get +### lotus-provider config get ``` NAME: - curio config get - Get a config layer by name. You may want to pipe the output to a file, or use 'less' + lotus-provider config get - Get a config layer by name. You may want to pipe the output to a file, or use 'less' USAGE: - curio config get [command options] layer name + lotus-provider config get [command options] layer name OPTIONS: --help, -h show help ``` -### curio config list +### lotus-provider config list ``` NAME: - curio config list - List config layers present in the DB. + lotus-provider config list - List config layers present in the DB. USAGE: - curio config list [command options] [arguments...] + lotus-provider config list [command options] [arguments...] OPTIONS: --help, -h show help ``` -### curio config interpret +### lotus-provider config interpret ``` NAME: - curio config interpret - Interpret stacked config layers by this version of curio, with system-generated comments. + lotus-provider config interpret - Interpret stacked config layers by this version of lotus-provider, with system-generated comments. USAGE: - curio config interpret [command options] a list of layers to be interpreted as the final config + lotus-provider config interpret [command options] a list of layers to be interpreted as the final config OPTIONS: --layers value [ --layers value ] comma or space separated list of layers to be interpreted (base is always applied) --help, -h show help ``` -### curio config remove +### lotus-provider config remove ``` NAME: - curio config remove - Remove a named config layer. + lotus-provider config remove - Remove a named config layer. USAGE: - curio config remove [command options] [arguments...] + lotus-provider config remove [command options] [arguments...] OPTIONS: --help, -h show help ``` -### curio config edit +### lotus-provider config edit ``` NAME: - curio config edit - edit a config layer + lotus-provider config edit - edit a config layer USAGE: - curio config edit [command options] [layer name] + lotus-provider config edit [command options] [layer name] OPTIONS: --editor value editor to use (default: "vim") [$EDITOR] @@ -206,43 +204,43 @@ OPTIONS: --help, -h show help ``` -### curio config from-miner +### lotus-provider config from-miner ``` NAME: - curio from-miner - Express a database config (for curio) from an existing miner. + lotus-provider config from-miner - Express a database config (for lotus-provider) from an existing miner. USAGE: - curio from-miner [command options] [arguments...] + lotus-provider config from-miner [command options] [arguments...] DESCRIPTION: - Express a database config (for curio) from an existing miner. + Express a database config (for lotus-provider) from an existing miner. OPTIONS: - --miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] + --miner-repo value, --storagerepo value Miner repo path (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] --to-layer value, -t value The layer name for this data push. 'base' is recommended for single-miner setup. --overwrite, -o Use this with --to-layer to replace an existing layer (default: false) --help, -h show help ``` -### curio config new-cluster +### lotus-provider config new-cluster ``` NAME: - curio config new-cluster - Create new configuration for a new cluster + lotus-provider config new-cluster - Create new configuration for a new cluster USAGE: - curio config new-cluster [command options] [SP actor address...] + lotus-provider config new-cluster [command options] [SP actor address...] OPTIONS: --help, -h show help ``` -## curio test +## lotus-provider test ``` NAME: - curio test - Utility functions for testing + lotus-provider test - Utility functions for testing USAGE: - curio test command [command options] [arguments...] + lotus-provider test command [command options] [arguments...] COMMANDS: window-post, wd, windowpost, wdpost Compute a proof-of-spacetime for a sector (requires the sector to be pre-sealed). These will not send to the chain. @@ -252,30 +250,30 @@ OPTIONS: --help, -h show help ``` -### curio test window-post +### lotus-provider test window-post ``` NAME: - curio test window-post - Compute a proof-of-spacetime for a sector (requires the sector to be pre-sealed). These will not send to the chain. + lotus-provider test window-post - Compute a proof-of-spacetime for a sector (requires the sector to be pre-sealed). These will not send to the chain. USAGE: - curio test window-post command [command options] [arguments...] + lotus-provider test window-post command [command options] [arguments...] COMMANDS: here, cli Compute WindowPoSt for performance and configuration testing. - task, scheduled, schedule, async, asynchronous Test the windowpost scheduler by running it on the next available curio. + task, scheduled, schedule, async, asynchronous Test the windowpost scheduler by running it on the next available lotus-provider. help, h Shows a list of commands or help for one command OPTIONS: --help, -h show help ``` -#### curio test window-post here +#### lotus-provider test window-post here ``` NAME: - curio test window-post here - Compute WindowPoSt for performance and configuration testing. + lotus-provider test window-post here - Compute WindowPoSt for performance and configuration testing. USAGE: - curio test window-post here [command options] [deadline index] + lotus-provider test window-post here [command options] [deadline index] DESCRIPTION: Note: This command is intended to be used to verify PoSt compute performance. @@ -284,18 +282,18 @@ DESCRIPTION: OPTIONS: --deadline value deadline to compute WindowPoSt for (default: 0) --layers value [ --layers value ] list of layers to be interpreted (atop defaults). Default: base - --storage-json value path to json file containing storage config (default: "~/.curio/storage.json") + --storage-json value path to json file containing storage config (default: "~/.lotus-provider/storage.json") --partition value partition to compute WindowPoSt for (default: 0) --help, -h show help ``` -#### curio test window-post task +#### lotus-provider test window-post task ``` NAME: - curio test window-post task - Test the windowpost scheduler by running it on the next available curio. + lotus-provider test window-post task - Test the windowpost scheduler by running it on the next available lotus-provider. USAGE: - curio test window-post task [command options] [arguments...] + lotus-provider test window-post task [command options] [arguments...] OPTIONS: --deadline value deadline to compute WindowPoSt for (default: 0) @@ -303,16 +301,16 @@ OPTIONS: --help, -h show help ``` -## curio web +## lotus-provider web ``` NAME: - curio web - Start Curio web interface + lotus-provider web - Start lotus provider web interface USAGE: - curio web [command options] [arguments...] + lotus-provider web [command options] [arguments...] DESCRIPTION: - Start an instance of Curio web interface. + Start an instance of lotus provider web interface. This creates the 'web' layer if it does not exist, then calls run with that layer. OPTIONS: @@ -322,43 +320,13 @@ OPTIONS: --help, -h show help ``` -## curio guided-setup -``` -NAME: - curio guided-setup - Run the guided setup for migrating from lotus-miner to Curio - -USAGE: - curio guided-setup [command options] [arguments...] - -OPTIONS: - --help, -h show help -``` - -## curio from-miner -``` -NAME: - curio from-miner - Express a database config (for curio) from an existing miner. - -USAGE: - curio from-miner [command options] [arguments...] - -DESCRIPTION: - Express a database config (for curio) from an existing miner. - -OPTIONS: - --miner-repo value, --storagerepo value Specify miner repo path. flag(storagerepo) and env(LOTUS_STORAGE_PATH) are DEPRECATION, will REMOVE SOON (default: "~/.lotusminer") [$LOTUS_MINER_PATH, $LOTUS_STORAGE_PATH] - --to-layer value, -t value The layer name for this data push. 'base' is recommended for single-miner setup. - --overwrite, -o Use this with --to-layer to replace an existing layer (default: false) - --help, -h show help -``` - -## curio seal +## lotus-provider seal ``` NAME: - curio seal - Manage the sealing pipeline + lotus-provider seal - Manage the sealing pipeline USAGE: - curio seal command [command options] [arguments...] + lotus-provider seal command [command options] [arguments...] COMMANDS: start Start new sealing operations manually @@ -368,13 +336,13 @@ OPTIONS: --help, -h show help ``` -### curio seal start +### lotus-provider seal start ``` NAME: - curio seal start - Start new sealing operations manually + lotus-provider seal start - Start new sealing operations manually USAGE: - curio seal start [command options] [arguments...] + lotus-provider seal start [command options] [arguments...] OPTIONS: --actor value Specify actor address to start sealing sectors for @@ -386,25 +354,25 @@ OPTIONS: --help, -h show help ``` -## curio version +## lotus-provider version ``` NAME: - curio version - Print version + lotus-provider version - Print version USAGE: - curio version [command options] [arguments...] + lotus-provider version [command options] [arguments...] OPTIONS: --help, -h show help ``` -## curio auth +## lotus-provider auth ``` NAME: - curio auth - Manage RPC permissions + lotus-provider auth - Manage RPC permissions USAGE: - curio auth command [command options] [arguments...] + lotus-provider auth command [command options] [arguments...] COMMANDS: create-token Create token @@ -415,39 +383,39 @@ OPTIONS: --help, -h show help ``` -### curio auth create-token +### lotus-provider auth create-token ``` NAME: - curio auth create-token - Create token + lotus-provider auth create-token - Create token USAGE: - curio auth create-token [command options] [arguments...] + lotus-provider auth create-token [command options] [arguments...] OPTIONS: --perm value permission to assign to the token, one of: read, write, sign, admin --help, -h show help ``` -### curio auth api-info +### lotus-provider auth api-info ``` NAME: - curio auth api-info - Get token with API info required to connect to this node + lotus-provider auth api-info - Get token with API info required to connect to this node USAGE: - curio auth api-info [command options] [arguments...] + lotus-provider auth api-info [command options] [arguments...] OPTIONS: --perm value permission to assign to the token, one of: read, write, sign, admin --help, -h show help ``` -## curio log +## lotus-provider log ``` NAME: - curio log - Manage logging + lotus-provider log - Manage logging USAGE: - curio log command [command options] [arguments...] + lotus-provider log command [command options] [arguments...] COMMANDS: list List log systems @@ -459,25 +427,25 @@ OPTIONS: --help, -h show help ``` -### curio log list +### lotus-provider log list ``` NAME: - curio log list - List log systems + lotus-provider log list - List log systems USAGE: - curio log list [command options] [arguments...] + lotus-provider log list [command options] [arguments...] OPTIONS: --help, -h show help ``` -### curio log set-level +### lotus-provider log set-level ``` NAME: - curio log set-level - Set log level + lotus-provider log set-level - Set log level USAGE: - curio log set-level [command options] [level] + lotus-provider log set-level [command options] [level] DESCRIPTION: Set the log level for logging systems: @@ -504,26 +472,26 @@ OPTIONS: --help, -h show help ``` -### curio log alerts +### lotus-provider log alerts ``` NAME: - curio log alerts - Get alert states + lotus-provider log alerts - Get alert states USAGE: - curio log alerts [command options] [arguments...] + lotus-provider log alerts [command options] [arguments...] OPTIONS: --all get all (active and inactive) alerts (default: false) --help, -h show help ``` -## curio wait-api +## lotus-provider wait-api ``` NAME: - curio wait-api - Wait for lotus api to come online + lotus-provider wait-api - Wait for lotus api to come online USAGE: - curio wait-api [command options] [arguments...] + lotus-provider wait-api [command options] [arguments...] CATEGORY: DEVELOPER @@ -533,13 +501,13 @@ OPTIONS: --help, -h show help ``` -## curio fetch-params +## lotus-provider fetch-params ``` NAME: - curio fetch-params - Fetch proving parameters + lotus-provider fetch-params - Fetch proving parameters USAGE: - curio fetch-params [command options] [sectorSize] + lotus-provider fetch-params [command options] [sectorSize] CATEGORY: DEVELOPER diff --git a/documentation/en/cli-lotus.md b/documentation/en/cli-lotus.md index ad04b68ecb4..65dd92f0125 100644 --- a/documentation/en/cli-lotus.md +++ b/documentation/en/cli-lotus.md @@ -1192,7 +1192,6 @@ COMMANDS: list-claims List claims available in verified registry actor or made by provider if specified remove-expired-allocations remove expired allocations (if no allocations are specified all eligible allocations are removed) remove-expired-claims remove expired claims (if no claims are specified all eligible claims are removed) - extend-claim extend claim expiration (TermMax) help, h Shows a list of commands or help for one command OPTIONS: @@ -1326,24 +1325,6 @@ OPTIONS: --help, -h show help ``` -### lotus filplus extend-claim -``` -NAME: - lotus filplus extend-claim - extend claim expiration (TermMax) - -USAGE: - lotus filplus extend-claim [command options] ... or ... - -OPTIONS: - --term-max value, --tmax value The maximum period for which a provider can earn quality-adjusted power for the piece (epochs). Default is 5 years. (default: 5256000) - --client value the client address that will used to send the message - --all automatically extend TermMax of all claims for specified miner[s] to --term-max (default: 5 years from claim start epoch) (default: false) - --miner value, -m value, --provider value, -p value [ --miner value, -m value, --provider value, -p value ] storage provider address[es] - --assume-yes, -y, --yes automatic yes to prompts; assume 'yes' as answer to all prompts and run non-interactively (default: false) - --confidence value number of block confirmations to wait for (default: 5) - --help, -h show help -``` - ## lotus paych ``` NAME: diff --git a/documentation/en/default-curio-config.toml b/documentation/en/default-lotus-provider-config.toml similarity index 95% rename from documentation/en/default-curio-config.toml rename to documentation/en/default-lotus-provider-config.toml index 83a7c243df1..dd99217696a 100644 --- a/documentation/en/default-curio-config.toml +++ b/documentation/en/default-lotus-provider-config.toml @@ -25,18 +25,6 @@ # type: int #WinningPostMaxTasks = 0 - # EnableParkPiece enables the "piece parking" task to run on this node. This task is responsible for fetching - # pieces from the network and storing them in the storage subsystem until sectors are sealed. This task is - # only applicable when integrating with boost, and should be enabled on nodes which will hold deal data - # from boost until sectors containing the related pieces have the TreeD/TreeR constructed. - # Note that future Curio implementations will have a separate task type for fetching pieces from the internet. - # - # type: bool - #EnableParkPiece = false - - # type: int - #ParkPieceMaxTasks = 0 - # EnableSealSDR enables SDR tasks to run. SDR is the long sequential computation # creating 11 layer files in sector cache directory. # diff --git a/gateway/node.go b/gateway/node.go index e9c695c4a5a..f3ecb764092 100644 --- a/gateway/node.go +++ b/gateway/node.go @@ -147,9 +147,8 @@ type TargetAPI interface { EthTraceBlock(ctx context.Context, blkNum string) ([]*ethtypes.EthTraceBlock, error) EthTraceReplayBlockTransactions(ctx context.Context, blkNum string, traceTypes []string) ([]*ethtypes.EthTraceReplayBlockTransaction, error) - GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) - SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) - ChainGetEvents(ctx context.Context, eventsRoot cid.Cid) ([]types.Event, error) + GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) + SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) } var _ TargetAPI = *new(api.FullNode) // gateway depends on latest diff --git a/gateway/proxy_fil.go b/gateway/proxy_fil.go index 9daa0796d3a..e7ad3bdb49e 100644 --- a/gateway/proxy_fil.go +++ b/gateway/proxy_fil.go @@ -437,35 +437,18 @@ func (gw *Node) StateWaitMsg(ctx context.Context, msg cid.Cid, confidence uint64 return gw.target.StateWaitMsg(ctx, msg, confidence, limit, allowReplaced) } -func (gw *Node) GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) { +func (gw *Node) GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) { if err := gw.limit(ctx, stateRateLimitTokens); err != nil { return nil, err } - if filter != nil && filter.FromHeight != nil { - if err := gw.checkTipSetHeight(ctx, *filter.FromHeight, types.EmptyTSK); err != nil { - return nil, err - } - } - return gw.target.GetActorEventsRaw(ctx, filter) + return gw.target.GetActorEvents(ctx, filter) } -func (gw *Node) SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { +func (gw *Node) SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { if err := gw.limit(ctx, stateRateLimitTokens); err != nil { return nil, err } - if filter != nil && filter.FromHeight != nil { - if err := gw.checkTipSetHeight(ctx, *filter.FromHeight, types.EmptyTSK); err != nil { - return nil, err - } - } - return gw.target.SubscribeActorEventsRaw(ctx, filter) -} - -func (gw *Node) ChainGetEvents(ctx context.Context, eventsRoot cid.Cid) ([]types.Event, error) { - if err := gw.limit(ctx, chainRateLimitTokens); err != nil { - return nil, err - } - return gw.target.ChainGetEvents(ctx, eventsRoot) + return gw.target.SubscribeActorEvents(ctx, filter) } func (gw *Node) StateReadState(ctx context.Context, actor address.Address, tsk types.TipSetKey) (*api.ActorState, error) { diff --git a/go.mod b/go.mod index 06b80fc36eb..b8f6c38f2e3 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,6 @@ require ( github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d github.com/alecthomas/jsonschema v0.0.0-20200530073317-71f438968921 github.com/buger/goterm v1.0.3 - github.com/charmbracelet/lipgloss v0.9.1 github.com/chzyer/readline v1.5.1 github.com/containerd/cgroups v1.1.0 github.com/coreos/go-systemd/v22 v22.5.0 @@ -48,7 +47,7 @@ require ( github.com/filecoin-project/go-jsonrpc v0.3.1 github.com/filecoin-project/go-padreader v0.0.1 github.com/filecoin-project/go-paramfetch v0.0.4 - github.com/filecoin-project/go-state-types v0.13.0-rc.3 + github.com/filecoin-project/go-state-types v0.13.0-rc.2 github.com/filecoin-project/go-statemachine v1.0.3 github.com/filecoin-project/go-statestore v0.2.0 github.com/filecoin-project/go-storedcounter v0.1.0 @@ -116,7 +115,6 @@ require ( github.com/libp2p/go-libp2p-routing-helpers v0.7.0 github.com/libp2p/go-maddr-filter v0.1.0 github.com/libp2p/go-msgio v0.3.0 - github.com/manifoldco/promptui v0.9.0 github.com/mattn/go-isatty v0.0.19 github.com/mattn/go-sqlite3 v1.14.16 github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 @@ -162,7 +160,6 @@ require ( golang.org/x/sync v0.3.0 golang.org/x/sys v0.16.0 golang.org/x/term v0.16.0 - golang.org/x/text v0.14.0 golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 golang.org/x/tools v0.12.1-0.20230815132531-74c255bcf846 golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 @@ -177,7 +174,6 @@ require ( github.com/StackExchange/wmi v1.2.1 // indirect github.com/akavel/rsrc v0.8.0 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect - github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/benbjohnson/clock v1.3.5 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bep/debounce v1.2.1 // indirect @@ -269,19 +265,17 @@ require ( github.com/libp2p/go-netroute v0.2.1 // indirect github.com/libp2p/go-reuseport v0.4.0 // indirect github.com/libp2p/go-yamux/v4 v4.0.1 // indirect - github.com/lucasb-eyer/go-colorful v1.2.0 // indirect + github.com/lucasb-eyer/go-colorful v1.0.3 // indirect github.com/magefile/mage v1.9.0 // indirect github.com/mailru/easyjson v0.7.7 // indirect github.com/marten-seemann/tcp v0.0.0-20210406111302-dfbc87cc63fd // indirect github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect + github.com/mattn/go-runewidth v0.0.10 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/miekg/dns v1.1.55 // indirect github.com/mikioh/tcpinfo v0.0.0-20190314235526-30a79bb1804b // indirect github.com/mikioh/tcpopt v0.0.0-20190314235656-172688c1accc // indirect github.com/mr-tron/base58 v1.2.0 // indirect - github.com/muesli/reflow v0.3.0 // indirect - github.com/muesli/termenv v0.15.2 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect github.com/multiformats/go-multiaddr-fmt v0.1.0 // indirect github.com/multiformats/go-multistream v0.4.1 // indirect @@ -301,7 +295,7 @@ require ( github.com/quic-go/qtls-go1-20 v0.3.3 // indirect github.com/quic-go/quic-go v0.38.2 // indirect github.com/quic-go/webtransport-go v0.5.3 // indirect - github.com/rivo/uniseg v0.2.0 // indirect + github.com/rivo/uniseg v0.1.0 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v2.18.12+incompatible // indirect @@ -326,6 +320,7 @@ require ( go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/exp v0.0.0-20230817173708-d852ddb80c63 // indirect golang.org/x/mod v0.12.0 // indirect + golang.org/x/text v0.14.0 // indirect gonum.org/v1/gonum v0.13.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230530153820-e85fd2cbaebc // indirect google.golang.org/grpc v1.55.0 // indirect diff --git a/go.sum b/go.sum index 5f0b05eec47..3efa6b8e2c9 100644 --- a/go.sum +++ b/go.sum @@ -106,8 +106,6 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= -github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= -github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= @@ -161,8 +159,6 @@ github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/charmbracelet/lipgloss v0.9.1 h1:PNyd3jvaJbg4jRHKWXnCj1akQm4rh8dbEzN1p/u1KWg= -github.com/charmbracelet/lipgloss v0.9.1/go.mod h1:1mPmG4cxScwUQALAAnacHaigiiHB9Pmr+v1VEawJl6I= github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= @@ -348,8 +344,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.11.2-0.20230712101859-8f37624fa540/go.mod h1:SyNPwTsU7I22gL2r0OAPcImvLoTVfgRwdK/Y5rR1zz8= -github.com/filecoin-project/go-state-types v0.13.0-rc.3 h1:gs+5uKYo2hDufhMzVfTWRsTp00rEY6nK/gYtTxj79RY= -github.com/filecoin-project/go-state-types v0.13.0-rc.3/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= +github.com/filecoin-project/go-state-types v0.13.0-rc.2 h1:JHyDDx/nV8sbQNgjUfhumiGWh8Dedc8psbiVtD0YOh0= +github.com/filecoin-project/go-state-types v0.13.0-rc.2/go.mod h1:cHpOPup9H1g2T29dKHAjC2sc7/Ef5ypjuW9A3I+e9yY= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.3 h1:N07o6alys+V1tNoSTi4WuuoeNC4erS/6jE74+NsgQuk= github.com/filecoin-project/go-statemachine v1.0.3/go.mod h1:jZdXXiHa61n4NmgWFG4w8tnqgvZVHYbJ3yW7+y8bF54= @@ -1179,9 +1175,8 @@ github.com/libp2p/go-yamux/v4 v4.0.1/go.mod h1:NWjl8ZTLOGlozrXSOZ/HlfG++39iKNnM5 github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/lucas-clemente/quic-go v0.19.3/go.mod h1:ADXpNbTQjq1hIzCpB+y/k5iz4n4z4IwqoLb94Kh5Hu8= +github.com/lucasb-eyer/go-colorful v1.0.3 h1:QIbQXiugsb+q10B+MI+7DI1oQLdmnep86tWFlaaUAac= github.com/lucasb-eyer/go-colorful v1.0.3/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= -github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= -github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magefile/mage v1.9.0 h1:t3AU2wNwehMCW97vuqQLtw6puppWXHO+O2MHo5a50XE= @@ -1197,8 +1192,6 @@ github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7 github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA= -github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg= github.com/marten-seemann/qpack v0.2.1/go.mod h1:F7Gl5L1jIgN1D11ucXefiuJS9UMVP2opoCp2jDKb7wc= github.com/marten-seemann/qtls v0.10.0/go.mod h1:UvMd1oaYDACI99/oZUYLzMCkBXQVT0aGm99sJhbT8hs= github.com/marten-seemann/qtls-go1-15 v0.1.1/go.mod h1:GyFwywLKkRt+6mfU99csTEY1joMZz5vmB1WNZH3P81I= @@ -1221,10 +1214,8 @@ github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APP github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= +github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y= github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= @@ -1274,10 +1265,6 @@ github.com/mr-tron/base58 v1.1.2/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjW github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= -github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= -github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= -github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= -github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/multiformats/go-base32 v0.0.3/go.mod h1:pLiuGC8y0QR3Ue4Zug5UzK9LjgbkL8NSQj0zQ5Nz/AA= github.com/multiformats/go-base32 v0.0.4/go.mod h1:jNLFzjPZtp3aIARHbJRZIaPuspdH0J6q39uUM5pnABM= github.com/multiformats/go-base32 v0.1.0 h1:pVx9xoSPqEIQG8o+UbAe7DNi51oej1NtK+aGkbLYxPE= @@ -1498,9 +1485,8 @@ github.com/raulk/clock v1.1.0/go.mod h1:3MpVxdZ/ODBQDxbN+kzshf5OSZwPjtMDx6BBXBmO github.com/raulk/go-watchdog v1.3.0 h1:oUmdlHxdkXRJlwfG0O9omj8ukerm8MEQavSiDTEtBsk= github.com/raulk/go-watchdog v1.3.0/go.mod h1:fIvOnLbF0b0ZwkB9YU4mOW9Did//4vPZtDqv66NfsMU= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= +github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= diff --git a/itests/direct_data_onboard_test.go b/itests/direct_data_onboard_test.go index 037fa1dbb53..703419ad123 100644 --- a/itests/direct_data_onboard_test.go +++ b/itests/direct_data_onboard_test.go @@ -274,7 +274,7 @@ func TestOnboardMixedMarketDDO(t *testing.T) { // check "deal-published" actor event var epochZero abi.ChainEpoch - allEvents, err := miner.FullNode.GetActorEventsRaw(ctx, &types.ActorEventFilter{ + allEvents, err := miner.FullNode.GetActorEvents(ctx, &types.ActorEventFilter{ FromHeight: &epochZero, }) require.NoError(t, err) diff --git a/itests/direct_data_onboard_verified_test.go b/itests/direct_data_onboard_verified_test.go index 2ac6142c0db..0c3de2448d2 100644 --- a/itests/direct_data_onboard_verified_test.go +++ b/itests/direct_data_onboard_verified_test.go @@ -37,7 +37,6 @@ import ( "github.com/filecoin-project/lotus/chain/actors/builtin/verifreg" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet/key" - "github.com/filecoin-project/lotus/cli" "github.com/filecoin-project/lotus/itests/kit" "github.com/filecoin-project/lotus/lib/must" "github.com/filecoin-project/lotus/storage/pipeline/piece" @@ -72,14 +71,14 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { /* --- Setup subscription channels for ActorEvents --- */ // subscribe only to miner's actor events - minerEvtsChan, err := miner.FullNode.SubscribeActorEventsRaw(ctx, &types.ActorEventFilter{ + minerEvtsChan, err := miner.FullNode.SubscribeActorEvents(ctx, &types.ActorEventFilter{ Addresses: []address.Address{miner.ActorAddr}, }) require.NoError(t, err) // subscribe only to sector-activated events sectorActivatedCbor := must.One(ipld.Encode(basicnode.NewString("sector-activated"), dagcbor.Encode)) - sectorActivatedEvtsChan, err := miner.FullNode.SubscribeActorEventsRaw(ctx, &types.ActorEventFilter{ + sectorActivatedEvtsChan, err := miner.FullNode.SubscribeActorEvents(ctx, &types.ActorEventFilter{ Fields: map[string][]types.ActorEventBlock{ "$type": { {Codec: uint64(multicodec.Cbor), Value: sectorActivatedCbor}, @@ -109,8 +108,7 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { /* --- Setup verified registry and client and allocate datacap to client */ - verifierAddr, verifiedClientAddrses := ddoVerifiedSetupVerifiedClient(ctx, t, client, rootKey, verifierKey, []*key.Key{verifiedClientKey}) - verifiedClientAddr := verifiedClientAddrses[0] + verifierAddr, verifiedClientAddr := ddoVerifiedSetupVerifiedClient(ctx, t, client, rootKey, verifierKey, verifiedClientKey) /* --- Prepare piece for onboarding --- */ @@ -123,13 +121,13 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { /* --- Allocate datacap for the piece by the verified client --- */ - clientId, allocationId := ddoVerifiedSetupAllocations(ctx, t, client, minerId, dc, verifiedClientAddr, true, 0) + clientId, allocationId := ddoVerifiedSetupAllocations(ctx, t, client, minerId, dc, verifiedClientAddr) head, err := client.ChainHead(ctx) require.NoError(t, err) // subscribe to actor events up until the current head - initialEventsChan, err := miner.FullNode.SubscribeActorEventsRaw(ctx, &types.ActorEventFilter{ + initialEventsChan, err := miner.FullNode.SubscribeActorEvents(ctx, &types.ActorEventFilter{ FromHeight: epochPtr(0), ToHeight: epochPtr(int64(head.Height())), }) @@ -286,19 +284,19 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { }, }, claims) - // construct ActorEvents from GetActorEventsRaw API - t.Logf("Inspecting full events list from GetActorEventsRaw") - allEvtsFromGetAPI, err := miner.FullNode.GetActorEventsRaw(ctx, &types.ActorEventFilter{ + // construct ActorEvents from GetActorEvents API + t.Logf("Inspecting full events list from GetActorEvents") + allEvtsFromGetAPI, err := miner.FullNode.GetActorEvents(ctx, &types.ActorEventFilter{ FromHeight: epochPtr(0), }) require.NoError(t, err) - fmt.Println("Events from GetActorEventsRaw:") + fmt.Println("Events from GetActorEvents:") printEvents(t, allEvtsFromGetAPI) - // compare events from messages and receipts with events from GetActorEventsRaw API + // compare events from messages and receipts with events from GetActorEvents API require.Equal(t, eventsFromMessages, allEvtsFromGetAPI) // construct ActorEvents from subscription channel for just the miner actor - t.Logf("Inspecting only miner's events list from SubscribeActorEventsRaw") + t.Logf("Inspecting only miner's events list from SubscribeActorEvents") var subMinerEvts []*types.ActorEvent for evt := range minerEvtsChan { subMinerEvts = append(subMinerEvts, evt) @@ -327,7 +325,7 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { } require.Len(t, sectorActivatedEvts, 2) // sanity check - t.Logf("Inspecting only sector-activated events list from real-time SubscribeActorEventsRaw") + t.Logf("Inspecting only sector-activated events list from real-time SubscribeActorEvents") var subscribedSectorActivatedEvts []*types.ActorEvent for evt := range sectorActivatedEvtsChan { subscribedSectorActivatedEvts = append(subscribedSectorActivatedEvts, evt) @@ -339,8 +337,8 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { require.Equal(t, sectorActivatedEvts, subscribedSectorActivatedEvts) // same thing but use historical event fetching to see the same list - t.Logf("Inspecting only sector-activated events list from historical SubscribeActorEventsRaw") - sectorActivatedEvtsChan, err = miner.FullNode.SubscribeActorEventsRaw(ctx, &types.ActorEventFilter{ + t.Logf("Inspecting only sector-activated events list from historical SubscribeActorEvents") + sectorActivatedEvtsChan, err = miner.FullNode.SubscribeActorEvents(ctx, &types.ActorEventFilter{ Fields: map[string][]types.ActorEventBlock{ "$type": { {Codec: uint64(multicodec.Cbor), Value: sectorActivatedCbor}, @@ -360,7 +358,7 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { require.Equal(t, sectorActivatedEvts, subscribedSectorActivatedEvts) // check that our `ToHeight` filter works as expected - t.Logf("Inspecting only initial list of events SubscribeActorEventsRaw with ToHeight") + t.Logf("Inspecting only initial list of events SubscribeActorEvents with ToHeight") var initialEvents []*types.ActorEvent for evt := range initialEventsChan { initialEvents = append(initialEvents, evt) @@ -369,8 +367,8 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { require.Equal(t, eventsFromMessages[0:6], initialEvents) // construct ActorEvents from subscription channel for all actor events - t.Logf("Inspecting full events list from historical SubscribeActorEventsRaw") - allEvtsChan, err := miner.FullNode.SubscribeActorEventsRaw(ctx, &types.ActorEventFilter{ + t.Logf("Inspecting full events list from historical SubscribeActorEvents") + allEvtsChan, err := miner.FullNode.SubscribeActorEvents(ctx, &types.ActorEventFilter{ FromHeight: epochPtr(0), }) require.NoError(t, err) @@ -385,7 +383,7 @@ func TestOnboardRawPieceVerified_WithActorEvents(t *testing.T) { require.Equal(t, eventsFromMessages, prefillEvts) t.Logf("All done comparing events") - // NOTE: There is a delay in finishing this test because the SubscribeActorEventsRaw + // NOTE: There is a delay in finishing this test because the SubscribeActorEvents // with the ToHeight (initialEventsChan) has to wait at least a full actual epoch before // realising that there's no more events for that filter. itests run with a different block // speed than the ActorEventHandler is aware of. @@ -398,57 +396,40 @@ func ddoVerifiedSetupAllocations( minerId uint64, dc abi.PieceInfo, verifiedClientAddr address.Address, - setupBorkAlloc bool, - tmax abi.ChainEpoch, ) (clientID abi.ActorID, allocationID verifregtypes13.AllocationId) { - if tmax == 0 { - tmax = verifregtypes13.MaximumVerifiedAllocationTerm - } - var requests []verifregtypes13.AllocationRequest + head, err := node.ChainHead(ctx) + require.NoError(t, err) // design this one to expire so we can observe allocation-removed - if setupBorkAlloc { - head, err := node.ChainHead(ctx) - require.NoError(t, err) - expiringAllocationHeight := head.Height() + 100 - allocationRequestBork := verifregtypes13.AllocationRequest{ - Provider: abi.ActorID(minerId), - Data: cid.MustParse("baga6ea4seaaqa"), - Size: dc.Size, - TermMin: verifregtypes13.MinimumVerifiedAllocationTerm, - TermMax: tmax, - Expiration: expiringAllocationHeight, - } - requests = append(requests, allocationRequestBork) + expiringAllocationHeight := head.Height() + 100 + allocationRequestBork := verifregtypes13.AllocationRequest{ + Provider: abi.ActorID(minerId), + Data: cid.MustParse("baga6ea4seaaqa"), + Size: dc.Size, + TermMin: verifregtypes13.MinimumVerifiedAllocationTerm, + TermMax: verifregtypes13.MaximumVerifiedAllocationTerm, + Expiration: expiringAllocationHeight, } - allocationRequest := verifregtypes13.AllocationRequest{ Provider: abi.ActorID(minerId), Data: dc.PieceCID, Size: dc.Size, TermMin: verifregtypes13.MinimumVerifiedAllocationTerm, - TermMax: tmax, + TermMax: verifregtypes13.MaximumVerifiedAllocationTerm, Expiration: verifregtypes13.MaximumVerifiedAllocationExpiration, } - requests = append(requests, allocationRequest) allocationRequests := verifregtypes13.AllocationRequests{ - Allocations: requests, + Allocations: []verifregtypes13.AllocationRequest{allocationRequestBork, allocationRequest}, } receiverParams, aerr := actors.SerializeParams(&allocationRequests) require.NoError(t, aerr) - var amt abi.TokenAmount - amt = big.Mul(big.NewInt(int64(dc.Size)), builtin.TokenPrecision) - if setupBorkAlloc { - amt = big.Mul(big.NewInt(int64(dc.Size*2)), builtin.TokenPrecision) - } - transferParams, aerr := actors.SerializeParams(&datacap2.TransferParams{ To: builtin.VerifiedRegistryActorAddr, - Amount: amt, + Amount: big.Mul(big.NewInt(int64(dc.Size*2)), builtin.TokenPrecision), OperatorData: receiverParams, }) require.NoError(t, aerr) @@ -471,11 +452,7 @@ func ddoVerifiedSetupAllocations( // check that we have an allocation allocations, err := node.StateGetAllocations(ctx, verifiedClientAddr, types.EmptyTSK) require.NoError(t, err) - if setupBorkAlloc { - require.Len(t, allocations, 2) // allocation waiting to be claimed - } else { - require.Len(t, allocations, 1) // allocation waiting to be claimed - } + require.Len(t, allocations, 2) // allocation waiting to be claimed for key, value := range allocations { if value.Data == dc.PieceCID { @@ -626,21 +603,18 @@ func ddoVerifiedBuildActorEventsFromMessages(ctx context.Context, t *testing.T, return actorEvents } -func ddoVerifiedSetupVerifiedClient(ctx context.Context, t *testing.T, client *kit.TestFullNode, rootKey *key.Key, verifierKey *key.Key, verifiedClientKeys []*key.Key) (verifierAddr address.Address, ret []address.Address) { +func ddoVerifiedSetupVerifiedClient(ctx context.Context, t *testing.T, client *kit.TestFullNode, rootKey *key.Key, verifierKey *key.Key, verifiedClientKey *key.Key) (address.Address, address.Address) { // import the root key. rootAddr, err := client.WalletImport(ctx, &rootKey.KeyInfo) require.NoError(t, err) // import the verifiers' keys. - verifierAddr, err = client.WalletImport(ctx, &verifierKey.KeyInfo) + verifierAddr, err := client.WalletImport(ctx, &verifierKey.KeyInfo) require.NoError(t, err) // import the verified client's key. - for _, k := range verifiedClientKeys { - verifiedClientAddr, err := client.WalletImport(ctx, &k.KeyInfo) - require.NoError(t, err) - ret = append(ret, verifiedClientAddr) - } + verifiedClientAddr, err := client.WalletImport(ctx, &verifiedClientKey.KeyInfo) + require.NoError(t, err) allowance := big.NewInt(100000000000) params, aerr := actors.SerializeParams(&verifregtypes13.AddVerifierParams{Address: verifierAddr, Allowance: allowance}) @@ -665,30 +639,28 @@ func ddoVerifiedSetupVerifiedClient(ctx context.Context, t *testing.T, client *k require.NoError(t, err) require.Equal(t, allowance, *verifierAllowance) - // assign datacap to clients - for _, ad := range ret { - initialDatacap := big.NewInt(10000) + // assign datacap to a client + initialDatacap := big.NewInt(10000) - params, aerr = actors.SerializeParams(&verifregtypes13.AddVerifiedClientParams{Address: ad, Allowance: initialDatacap}) - require.NoError(t, aerr) + params, aerr = actors.SerializeParams(&verifregtypes13.AddVerifiedClientParams{Address: verifiedClientAddr, Allowance: initialDatacap}) + require.NoError(t, aerr) - msg = &types.Message{ - From: verifierAddr, - To: verifreg.Address, - Method: verifreg.Methods.AddVerifiedClient, - Params: params, - Value: big.Zero(), - } + msg = &types.Message{ + From: verifierAddr, + To: verifreg.Address, + Method: verifreg.Methods.AddVerifiedClient, + Params: params, + Value: big.Zero(), + } - sm, err = client.MpoolPushMessage(ctx, msg, nil) - require.NoError(t, err) + sm, err = client.MpoolPushMessage(ctx, msg, nil) + require.NoError(t, err) - res, err = client.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true) - require.NoError(t, err) - require.EqualValues(t, 0, res.Receipt.ExitCode) - } + res, err = client.StateWaitMsg(ctx, sm.Cid(), 1, lapi.LookbackNoLimit, true) + require.NoError(t, err) + require.EqualValues(t, 0, res.Receipt.ExitCode) - return + return verifierAddr, verifiedClientAddr } func filterEvents(events []*types.ActorEvent, key string) []*types.ActorEvent { @@ -739,122 +711,3 @@ func epochPtr(ei int64) *abi.ChainEpoch { ep := abi.ChainEpoch(ei) return &ep } - -func TestVerifiedDDOExtendClaim(t *testing.T) { - kit.QuietMiningLogs() - - var ( - blocktime = 2 * time.Millisecond - ctx = context.Background() - ) - - rootKey, err := key.GenerateKey(types.KTSecp256k1) - require.NoError(t, err) - - verifierKey, err := key.GenerateKey(types.KTSecp256k1) - require.NoError(t, err) - - verifiedClientKey1, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - verifiedClientKey2, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - unverifiedClient, err := key.GenerateKey(types.KTBLS) - require.NoError(t, err) - - bal, err := types.ParseFIL("100fil") - require.NoError(t, err) - - client, miner, ens := kit.EnsembleMinimal(t, kit.ThroughRPC(), - kit.RootVerifier(rootKey, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifierKey, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifiedClientKey1, abi.NewTokenAmount(bal.Int64())), - kit.Account(verifiedClientKey2, abi.NewTokenAmount(bal.Int64())), - kit.Account(unverifiedClient, abi.NewTokenAmount(bal.Int64())), - ) - - /* --- Start mining --- */ - - ens.InterconnectAll().BeginMiningMustPost(blocktime) - - minerId, err := address.IDFromAddress(miner.ActorAddr) - require.NoError(t, err) - - /* --- Setup verified registry and clients and allocate datacap to client */ - - _, verifiedClientAddrses := ddoVerifiedSetupVerifiedClient(ctx, t, client, rootKey, verifierKey, []*key.Key{verifiedClientKey1, verifiedClientKey2}) - verifiedClientAddr1 := verifiedClientAddrses[0] - verifiedClientAddr2 := verifiedClientAddrses[1] - - /* --- Prepare piece for onboarding --- */ - - pieceSize := abi.PaddedPieceSize(2048).Unpadded() - pieceData := make([]byte, pieceSize) - _, _ = rand.Read(pieceData) - - dc, err := miner.ComputeDataCid(ctx, pieceSize, bytes.NewReader(pieceData)) - require.NoError(t, err) - - /* --- Allocate datacap for the piece by the verified client --- */ - clientId, allocationId := ddoVerifiedSetupAllocations(ctx, t, client, minerId, dc, verifiedClientAddr1, false, builtin.EpochsInYear*3) - - /* --- Onboard the piece --- */ - - _, _ = ddoVerifiedOnboardPiece(ctx, t, miner, clientId, allocationId, dc, pieceData) - - oldclaim, err := client.StateGetClaim(ctx, miner.ActorAddr, verifreg.ClaimId(allocationId), types.EmptyTSK) - require.NoError(t, err) - require.NotNil(t, oldclaim) - - prov := cli.ProvInfo{ - Addr: miner.ActorAddr, - ID: abi.ActorID(minerId), - } - - pcm := make(map[verifregtypes13.ClaimId]cli.ProvInfo) - pcm[verifregtypes13.ClaimId(allocationId)] = prov - - // Extend claim with same client - msgs, err := cli.CreateExtendClaimMsg(ctx, client.FullNode, pcm, []string{}, verifiedClientAddr1, (builtin.EpochsInYear*3)+3000, false, true) - require.NoError(t, err) - require.NotNil(t, msgs) - require.Len(t, msgs, 1) - - // MpoolBatchPushMessage method will take care of gas estimation and funds check - smsg, err := client.MpoolPushMessage(ctx, msgs[0], nil) - require.NoError(t, err) - - wait, err := client.StateWaitMsg(ctx, smsg.Cid(), 1, 2000, true) - require.NoError(t, err) - require.True(t, wait.Receipt.ExitCode.IsSuccess()) - - newclaim, err := client.StateGetClaim(ctx, miner.ActorAddr, verifreg.ClaimId(allocationId), types.EmptyTSK) - require.NoError(t, err) - require.NotNil(t, newclaim) - require.EqualValues(t, newclaim.TermMax-oldclaim.TermMax, 3000) - - // Extend claim with non-verified client | should fail - _, err = cli.CreateExtendClaimMsg(ctx, client.FullNode, pcm, []string{}, unverifiedClient.Address, verifregtypes13.MaximumVerifiedAllocationTerm, false, true) - require.ErrorContains(t, err, "does not have any datacap") - - // Extend all claim with verified client - msgs, err = cli.CreateExtendClaimMsg(ctx, client.FullNode, nil, []string{miner.ActorAddr.String()}, verifiedClientAddr2, verifregtypes13.MaximumVerifiedAllocationTerm, true, true) - require.NoError(t, err) - require.Len(t, msgs, 1) - smsg, err = client.MpoolPushMessage(ctx, msgs[0], nil) - require.NoError(t, err) - wait, err = client.StateWaitMsg(ctx, smsg.Cid(), 1, 2000, true) - require.NoError(t, err) - require.True(t, wait.Receipt.ExitCode.IsSuccess()) - - // Extend all claims with lower TermMax - msgs, err = cli.CreateExtendClaimMsg(ctx, client.FullNode, pcm, []string{}, verifiedClientAddr2, builtin.EpochsInYear*4, false, true) - require.NoError(t, err) - require.Nil(t, msgs) - - newclaim, err = client.StateGetClaim(ctx, miner.ActorAddr, verifreg.ClaimId(allocationId), types.EmptyTSK) - require.NoError(t, err) - require.NotNil(t, newclaim) - require.EqualValues(t, newclaim.TermMax, verifregtypes13.MaximumVerifiedAllocationTerm) -} diff --git a/itests/kit/ensemble.go b/itests/kit/ensemble.go index 9588d252695..c315b21c9d3 100644 --- a/itests/kit/ensemble.go +++ b/itests/kit/ensemble.go @@ -46,9 +46,9 @@ import ( "github.com/filecoin-project/lotus/chain/stmgr" "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet/key" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/cmd/curio/rpc" - "github.com/filecoin-project/lotus/cmd/curio/tasks" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/rpc" + "github.com/filecoin-project/lotus/cmd/lotus-provider/tasks" "github.com/filecoin-project/lotus/cmd/lotus-seed/seed" "github.com/filecoin-project/lotus/cmd/lotus-worker/sealworker" "github.com/filecoin-project/lotus/gateway" diff --git a/itests/kit/node_full.go b/itests/kit/node_full.go index c36f05a7592..697c59aede4 100644 --- a/itests/kit/node_full.go +++ b/itests/kit/node_full.go @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/wallet/key" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/gateway" "github.com/filecoin-project/lotus/node" ) @@ -57,7 +57,7 @@ type TestFullNode struct { // TestProviderNode represents a Provider node enrolled in an Ensemble. type TestProviderNode struct { - v1api.CurioStruct + v1api.LotusProviderStruct t *testing.T diff --git a/itests/sector_terminate_test.go b/itests/sector_terminate_test.go index ac586ff8f45..57cffb0068e 100644 --- a/itests/sector_terminate_test.go +++ b/itests/sector_terminate_test.go @@ -173,7 +173,7 @@ loop: // check "sector-terminated" actor event var epochZero abi.ChainEpoch - allEvents, err := miner.FullNode.GetActorEventsRaw(ctx, &types.ActorEventFilter{ + allEvents, err := miner.FullNode.GetActorEvents(ctx, &types.ActorEventFilter{ FromHeight: &epochZero, }) require.NoError(t, err) diff --git a/lib/harmony/harmonydb/harmonydb.go b/lib/harmony/harmonydb/harmonydb.go index 7352866d6b3..a043e903f9f 100644 --- a/lib/harmony/harmonydb/harmonydb.go +++ b/lib/harmony/harmonydb/harmonydb.go @@ -84,7 +84,7 @@ func New(hosts []string, username, password, database, port string, itestID ITes } } - schema := "curio" + schema := "lotus" if itest != "" { schema = "itest_" + itest } @@ -263,7 +263,6 @@ func (db *DB) upgrade() error { if len(dir) == 0 { logger.Error("No sql files found.") } - last := "" for _, e := range dir { name := e.Name() if !strings.HasSuffix(name, ".sql") { @@ -274,9 +273,6 @@ func (db *DB) upgrade() error { logger.Debug("DB Schema " + name + " already applied.") continue } - if last[:8] == name[:8] { - return xerrors.Errorf("Two files have the same date prefix: " + last + " and " + name) - } file, err := fs.ReadFile("sql/" + name) if err != nil { logger.Error("weird embed file read err") @@ -300,7 +296,6 @@ func (db *DB) upgrade() error { logger.Error("Cannot update base: " + err.Error()) return xerrors.Errorf("cannot insert into base: %w", err) } - last = name } return nil } diff --git a/lib/harmony/harmonydb/sql/20240212-common-layers.sql b/lib/harmony/harmonydb/sql/20240212-common-layers.sql deleted file mode 100644 index cf72e175023..00000000000 --- a/lib/harmony/harmonydb/sql/20240212-common-layers.sql +++ /dev/null @@ -1,42 +0,0 @@ -INSERT INTO harmony_config (title, config) VALUES - ('post', ' - [Subsystems] - EnableWindowPost = true - EnableWinningPost = true - '), - - ('gui', ' - [Subsystems] - EnableWebGui = true - '), - - ('seal', ' - [Subsystems] - EnableSealSDR = true - EnableSealSDRTrees = true - EnableSendPrecommitMsg = true - EnablePoRepProof = true - EnableSendCommitMsg = true - EnableMoveStorage = true - '), - - ('seal-gpu', ' - [Subsystems] - EnableSealSDRTrees = true - EnableSendPrecommitMsg = true - '), - ('seal-snark', ' - [Subsystems] - EnablePoRepProof = true - EnableSendCommitMsg = true - '), - ('sdr', ' - [Subsystems] - EnableSealSDR = true - '), - - ('storage', ' - [Subsystems] - EnableMoveStorage = true - ') - ON CONFLICT (title) DO NOTHING; -- SPs may have these names defined already. \ No newline at end of file diff --git a/lib/harmony/harmonydb/sql/20240228-piece-park.sql b/lib/harmony/harmonydb/sql/20240228-piece-park.sql deleted file mode 100644 index 9ee6b447f39..00000000000 --- a/lib/harmony/harmonydb/sql/20240228-piece-park.sql +++ /dev/null @@ -1,35 +0,0 @@ -create table parked_pieces ( - id bigserial primary key, - created_at timestamp default current_timestamp, - - piece_cid text not null, - piece_padded_size bigint not null, - piece_raw_size bigint not null, - - complete boolean not null default false, - task_id bigint default null, - - cleanup_task_id bigint default null, - - foreign key (task_id) references harmony_task (id) on delete set null, - foreign key (cleanup_task_id) references harmony_task (id) on delete set null, - unique (piece_cid) -); - -/* - * This table is used to keep track of the references to the parked pieces - * so that we can delete them when they are no longer needed. - * - * All references into the parked_pieces table should be done through this table. - * - * data_url is optional for refs which also act as data sources. - */ -create table parked_piece_refs ( - ref_id bigserial primary key, - piece_id bigint not null, - - data_url text, - data_headers jsonb not null default '{}', - - foreign key (piece_id) references parked_pieces(id) on delete cascade -); diff --git a/lib/harmony/harmonydb/sql/20240317-web-summary-index.sql b/lib/harmony/harmonydb/sql/20240317-web-summary-index.sql deleted file mode 100644 index 28902448d05..00000000000 --- a/lib/harmony/harmonydb/sql/20240317-web-summary-index.sql +++ /dev/null @@ -1,7 +0,0 @@ -/* Used for webui clusterMachineSummary */ -CREATE INDEX harmony_task_history_work_index - ON harmony_task_history (completed_by_host_and_port ASC, name ASC, result ASC, work_end DESC); - -/* Used for webui actorSummary sp wins */ -CREATE INDEX mining_tasks_won_sp_id_base_compute_time_index - ON mining_tasks (won ASC, sp_id ASC, base_compute_time DESC); diff --git a/lib/harmony/resources/getGPU.go b/lib/harmony/resources/getGPU.go index 62d5c091e11..3489e749180 100644 --- a/lib/harmony/resources/getGPU.go +++ b/lib/harmony/resources/getGPU.go @@ -4,23 +4,12 @@ package resources import ( - "os" - "strconv" "strings" ffi "github.com/filecoin-project/filecoin-ffi" ) func getGPUDevices() float64 { // GPU boolean - if nstr := os.Getenv("HARMONY_OVERRIDE_GPUS"); nstr != "" { - n, err := strconv.ParseFloat(nstr, 64) - if err != nil { - logger.Errorf("parsing HARMONY_OVERRIDE_GPUS failed: %+v", err) - } else { - return n - } - } - gpus, err := ffi.GetGPUDevices() logger.Infow("GPUs", "list", gpus) if err != nil { diff --git a/lib/harmony/resources/resources.go b/lib/harmony/resources/resources.go index 33bc80d6fe7..4f67a26aff7 100644 --- a/lib/harmony/resources/resources.go +++ b/lib/harmony/resources/resources.go @@ -131,7 +131,7 @@ func getResources() (res Resources, err error) { } } if found > 1 { - logger.Warn("curio's defaults are for running alone. Use task maximums or CGroups.") + logger.Warn("lotus-provider's defaults are for running alone. Use task maximums or CGroups.") } } diff --git a/node/config/def.go b/node/config/def.go index 2e5fb80327e..475f37517d1 100644 --- a/node/config/def.go +++ b/node/config/def.go @@ -329,12 +329,12 @@ const ( ResourceFilteringDisabled = ResourceFilteringStrategy("disabled") ) -func DefaultCurioConfig() *CurioConfig { - return &CurioConfig{ - Subsystems: CurioSubsystemsConfig{ +func DefaultLotusProvider() *LotusProviderConfig { + return &LotusProviderConfig{ + Subsystems: ProviderSubsystemsConfig{ GuiAddress: ":4701", }, - Fees: CurioFees{ + Fees: LotusProviderFees{ DefaultMaxFee: DefaultDefaultMaxFee, MaxPreCommitGasFee: types.MustParseFIL("0.025"), MaxCommitGasFee: types.MustParseFIL("0.05"), @@ -352,7 +352,7 @@ func DefaultCurioConfig() *CurioConfig { MaxWindowPoStGasFee: types.MustParseFIL("5"), MaxPublishDealsFee: types.MustParseFIL("0.05"), }, - Addresses: []CurioAddresses{{ + Addresses: []LotusProviderAddresses{{ PreCommitControl: []string{}, CommitControl: []string{}, TerminateControl: []string{}, diff --git a/node/config/doc_gen.go b/node/config/doc_gen.go index dcb832976dd..f28c5abd8ff 100644 --- a/node/config/doc_gen.go +++ b/node/config/doc_gen.go @@ -165,314 +165,6 @@ of automatically performing on-chain operations.`, Comment: ``, }, }, - "CurioAddresses": { - { - Name: "PreCommitControl", - Type: "[]string", - - Comment: `Addresses to send PreCommit messages from`, - }, - { - Name: "CommitControl", - Type: "[]string", - - Comment: `Addresses to send Commit messages from`, - }, - { - Name: "TerminateControl", - Type: "[]string", - - Comment: ``, - }, - { - Name: "DisableOwnerFallback", - Type: "bool", - - Comment: `DisableOwnerFallback disables usage of the owner address for messages -sent automatically`, - }, - { - Name: "DisableWorkerFallback", - Type: "bool", - - Comment: `DisableWorkerFallback disables usage of the worker address for messages -sent automatically, if control addresses are configured. -A control address that doesn't have enough funds will still be chosen -over the worker address if this flag is set.`, - }, - { - Name: "MinerAddresses", - Type: "[]string", - - Comment: `MinerAddresses are the addresses of the miner actors to use for sending messages`, - }, - }, - "CurioConfig": { - { - Name: "Subsystems", - Type: "CurioSubsystemsConfig", - - Comment: ``, - }, - { - Name: "Fees", - Type: "CurioFees", - - Comment: ``, - }, - { - Name: "Addresses", - Type: "[]CurioAddresses", - - Comment: `Addresses of wallets per MinerAddress (one of the fields).`, - }, - { - Name: "Proving", - Type: "ProvingConfig", - - Comment: ``, - }, - { - Name: "Journal", - Type: "JournalConfig", - - Comment: ``, - }, - { - Name: "Apis", - Type: "ApisConfig", - - Comment: ``, - }, - }, - "CurioFees": { - { - Name: "DefaultMaxFee", - Type: "types.FIL", - - Comment: ``, - }, - { - Name: "MaxPreCommitGasFee", - Type: "types.FIL", - - Comment: ``, - }, - { - Name: "MaxCommitGasFee", - Type: "types.FIL", - - Comment: ``, - }, - { - Name: "MaxPreCommitBatchGasFee", - Type: "BatchFeeConfig", - - Comment: `maxBatchFee = maxBase + maxPerSector * nSectors`, - }, - { - Name: "MaxCommitBatchGasFee", - Type: "BatchFeeConfig", - - Comment: ``, - }, - { - Name: "MaxTerminateGasFee", - Type: "types.FIL", - - Comment: ``, - }, - { - Name: "MaxWindowPoStGasFee", - Type: "types.FIL", - - Comment: `WindowPoSt is a high-value operation, so the default fee should be high.`, - }, - { - Name: "MaxPublishDealsFee", - Type: "types.FIL", - - Comment: ``, - }, - }, - "CurioSubsystemsConfig": { - { - Name: "EnableWindowPost", - Type: "bool", - - Comment: `EnableWindowPost enables window post to be executed on this lotus-provider instance. Each machine in the cluster -with WindowPoSt enabled will also participate in the window post scheduler. It is possible to have multiple -machines with WindowPoSt enabled which will provide redundancy, and in case of multiple partitions per deadline, -will allow for parallel processing of partitions. - -It is possible to have instances handling both WindowPoSt and WinningPoSt, which can provide redundancy without -the need for additional machines. In setups like this it is generally recommended to run -partitionsPerDeadline+1 machines.`, - }, - { - Name: "WindowPostMaxTasks", - Type: "int", - - Comment: ``, - }, - { - Name: "EnableWinningPost", - Type: "bool", - - Comment: `EnableWinningPost enables winning post to be executed on this lotus-provider instance. -Each machine in the cluster with WinningPoSt enabled will also participate in the winning post scheduler. -It is possible to mix machines with WindowPoSt and WinningPoSt enabled, for details see the EnableWindowPost -documentation.`, - }, - { - Name: "WinningPostMaxTasks", - Type: "int", - - Comment: ``, - }, - { - Name: "EnableParkPiece", - Type: "bool", - - Comment: `EnableParkPiece enables the "piece parking" task to run on this node. This task is responsible for fetching -pieces from the network and storing them in the storage subsystem until sectors are sealed. This task is -only applicable when integrating with boost, and should be enabled on nodes which will hold deal data -from boost until sectors containing the related pieces have the TreeD/TreeR constructed. -Note that future Curio implementations will have a separate task type for fetching pieces from the internet.`, - }, - { - Name: "ParkPieceMaxTasks", - Type: "int", - - Comment: ``, - }, - { - Name: "EnableSealSDR", - Type: "bool", - - Comment: `EnableSealSDR enables SDR tasks to run. SDR is the long sequential computation -creating 11 layer files in sector cache directory. - -SDR is the first task in the sealing pipeline. It's inputs are just the hash of the -unsealed data (CommD), sector number, miner id, and the seal proof type. -It's outputs are the 11 layer files in the sector cache directory. - -In lotus-miner this was run as part of PreCommit1.`, - }, - { - Name: "SealSDRMaxTasks", - Type: "int", - - Comment: `The maximum amount of SDR tasks that can run simultaneously. Note that the maximum number of tasks will -also be bounded by resources available on the machine.`, - }, - { - Name: "EnableSealSDRTrees", - Type: "bool", - - Comment: `EnableSealSDRTrees enables the SDR pipeline tree-building task to run. -This task handles encoding of unsealed data into last sdr layer and building -of TreeR, TreeC and TreeD. - -This task runs after SDR -TreeD is first computed with optional input of unsealed data -TreeR is computed from replica, which is first computed as field -addition of the last SDR layer and the bottom layer of TreeD (which is the unsealed data) -TreeC is computed from the 11 SDR layers -The 3 trees will later be used to compute the PoRep proof. - -In case of SyntheticPoRep challenges for PoRep will be pre-generated at this step, and trees and layers -will be dropped. SyntheticPoRep works by pre-generating a very large set of challenges (~30GiB on disk) -then using a small subset of them for the actual PoRep computation. This allows for significant scratch space -saving between PreCommit and PoRep generation at the expense of more computation (generating challenges in this step) - -In lotus-miner this was run as part of PreCommit2 (TreeD was run in PreCommit1). -Note that nodes with SDRTrees enabled will also answer to Finalize tasks, -which just remove unneeded tree data after PoRep is computed.`, - }, - { - Name: "SealSDRTreesMaxTasks", - Type: "int", - - Comment: `The maximum amount of SealSDRTrees tasks that can run simultaneously. Note that the maximum number of tasks will -also be bounded by resources available on the machine.`, - }, - { - Name: "FinalizeMaxTasks", - Type: "int", - - Comment: `FinalizeMaxTasks is the maximum amount of finalize tasks that can run simultaneously. -The finalize task is enabled on all machines which also handle SDRTrees tasks. Finalize ALWAYS runs on whichever -machine holds sector cache files, as it removes unneeded tree data after PoRep is computed. -Finalize will run in parallel with the SubmitCommitMsg task.`, - }, - { - Name: "EnableSendPrecommitMsg", - Type: "bool", - - Comment: `EnableSendPrecommitMsg enables the sending of precommit messages to the chain -from this lotus-provider instance. -This runs after SDRTrees and uses the output CommD / CommR (roots of TreeD / TreeR) for the message`, - }, - { - Name: "EnablePoRepProof", - Type: "bool", - - Comment: `EnablePoRepProof enables the computation of the porep proof - -This task runs after interactive-porep seed becomes available, which happens 150 epochs (75min) after the -precommit message lands on chain. This task should run on a machine with a GPU. Vanilla PoRep proofs are -requested from the machine which holds sector cache files which most likely is the machine which ran the SDRTrees -task. - -In lotus-miner this was Commit1 / Commit2`, - }, - { - Name: "PoRepProofMaxTasks", - Type: "int", - - Comment: `The maximum amount of PoRepProof tasks that can run simultaneously. Note that the maximum number of tasks will -also be bounded by resources available on the machine.`, - }, - { - Name: "EnableSendCommitMsg", - Type: "bool", - - Comment: `EnableSendCommitMsg enables the sending of commit messages to the chain -from this lotus-provider instance.`, - }, - { - Name: "EnableMoveStorage", - Type: "bool", - - Comment: `EnableMoveStorage enables the move-into-long-term-storage task to run on this lotus-provider instance. -This tasks should only be enabled on nodes with long-term storage. - -The MoveStorage task is the last task in the sealing pipeline. It moves the sealed sector data from the -SDRTrees machine into long-term storage. This task runs after the Finalize task.`, - }, - { - Name: "MoveStorageMaxTasks", - Type: "int", - - Comment: `The maximum amount of MoveStorage tasks that can run simultaneously. Note that the maximum number of tasks will -also be bounded by resources available on the machine. It is recommended that this value is set to a number which -uses all available network (or disk) bandwidth on the machine without causing bottlenecks.`, - }, - { - Name: "EnableWebGui", - Type: "bool", - - Comment: `EnableWebGui enables the web GUI on this lotus-provider instance. The UI has minimal local overhead, but it should -only need to be run on a single machine in the cluster.`, - }, - { - Name: "GuiAddress", - Type: "string", - - Comment: `The address that should listen for Web GUI requests.`, - }, - }, "DAGStoreConfig": { { Name: "RootDir", @@ -907,104 +599,234 @@ Defaults to 16384 if not specified. Note that chunks are chained together for in advertisements that include more multihashes than the configured EntriesChunkSize.`, }, { - Name: "TopicName", - Type: "string", + Name: "TopicName", + Type: "string", + + Comment: `TopicName sets the topic name on which the changes to the advertised content are announced. +If not explicitly specified, the topic name is automatically inferred from the network name +in following format: '/indexer/ingest/' +Defaults to empty, which implies the topic name is inferred from network name.`, + }, + { + Name: "PurgeCacheOnStart", + Type: "bool", + + Comment: `PurgeCacheOnStart sets whether to clear any cached entries chunks when the provider engine +starts. By default, the cache is rehydrated from previously cached entries stored in +datastore if any is present.`, + }, + }, + "JournalConfig": { + { + Name: "DisabledEvents", + Type: "string", + + Comment: `Events of the form: "system1:event1,system1:event2[,...]"`, + }, + }, + "Libp2p": { + { + Name: "ListenAddresses", + Type: "[]string", + + Comment: `Binding address for the libp2p host - 0 means random port. +Format: multiaddress; see https://multiformats.io/multiaddr/`, + }, + { + Name: "AnnounceAddresses", + Type: "[]string", + + Comment: `Addresses to explicitally announce to other peers. If not specified, +all interface addresses are announced +Format: multiaddress`, + }, + { + Name: "NoAnnounceAddresses", + Type: "[]string", + + Comment: `Addresses to not announce +Format: multiaddress`, + }, + { + Name: "BootstrapPeers", + Type: "[]string", + + Comment: ``, + }, + { + Name: "ProtectedPeers", + Type: "[]string", + + Comment: ``, + }, + { + Name: "DisableNatPortMap", + Type: "bool", + + Comment: `When not disabled (default), lotus asks NAT devices (e.g., routers), to +open up an external port and forward it to the port lotus is running on. +When this works (i.e., when your router supports NAT port forwarding), +it makes the local lotus node accessible from the public internet`, + }, + { + Name: "ConnMgrLow", + Type: "uint", + + Comment: `ConnMgrLow is the number of connections that the basic connection manager +will trim down to.`, + }, + { + Name: "ConnMgrHigh", + Type: "uint", + + Comment: `ConnMgrHigh is the number of connections that, when exceeded, will trigger +a connection GC operation. Note: protected/recently formed connections don't +count towards this limit.`, + }, + { + Name: "ConnMgrGrace", + Type: "Duration", + + Comment: `ConnMgrGrace is a time duration that new connections are immune from being +closed by the connection manager.`, + }, + }, + "Logging": { + { + Name: "SubsystemLevels", + Type: "map[string]string", + + Comment: `SubsystemLevels specify per-subsystem log levels`, + }, + }, + "LotusProviderAddresses": { + { + Name: "PreCommitControl", + Type: "[]string", + + Comment: `Addresses to send PreCommit messages from`, + }, + { + Name: "CommitControl", + Type: "[]string", + + Comment: `Addresses to send Commit messages from`, + }, + { + Name: "TerminateControl", + Type: "[]string", + + Comment: ``, + }, + { + Name: "DisableOwnerFallback", + Type: "bool", + + Comment: `DisableOwnerFallback disables usage of the owner address for messages +sent automatically`, + }, + { + Name: "DisableWorkerFallback", + Type: "bool", + + Comment: `DisableWorkerFallback disables usage of the worker address for messages +sent automatically, if control addresses are configured. +A control address that doesn't have enough funds will still be chosen +over the worker address if this flag is set.`, + }, + { + Name: "MinerAddresses", + Type: "[]string", + + Comment: `MinerAddresses are the addresses of the miner actors to use for sending messages`, + }, + }, + "LotusProviderConfig": { + { + Name: "Subsystems", + Type: "ProviderSubsystemsConfig", + + Comment: ``, + }, + { + Name: "Fees", + Type: "LotusProviderFees", - Comment: `TopicName sets the topic name on which the changes to the advertised content are announced. -If not explicitly specified, the topic name is automatically inferred from the network name -in following format: '/indexer/ingest/' -Defaults to empty, which implies the topic name is inferred from network name.`, + Comment: ``, }, { - Name: "PurgeCacheOnStart", - Type: "bool", + Name: "Addresses", + Type: "[]LotusProviderAddresses", - Comment: `PurgeCacheOnStart sets whether to clear any cached entries chunks when the provider engine -starts. By default, the cache is rehydrated from previously cached entries stored in -datastore if any is present.`, + Comment: `Addresses of wallets per MinerAddress (one of the fields).`, }, - }, - "JournalConfig": { { - Name: "DisabledEvents", - Type: "string", + Name: "Proving", + Type: "ProvingConfig", - Comment: `Events of the form: "system1:event1,system1:event2[,...]"`, + Comment: ``, }, - }, - "Libp2p": { { - Name: "ListenAddresses", - Type: "[]string", + Name: "Journal", + Type: "JournalConfig", - Comment: `Binding address for the libp2p host - 0 means random port. -Format: multiaddress; see https://multiformats.io/multiaddr/`, + Comment: ``, }, { - Name: "AnnounceAddresses", - Type: "[]string", + Name: "Apis", + Type: "ApisConfig", - Comment: `Addresses to explicitally announce to other peers. If not specified, -all interface addresses are announced -Format: multiaddress`, + Comment: ``, }, + }, + "LotusProviderFees": { { - Name: "NoAnnounceAddresses", - Type: "[]string", + Name: "DefaultMaxFee", + Type: "types.FIL", - Comment: `Addresses to not announce -Format: multiaddress`, + Comment: ``, }, { - Name: "BootstrapPeers", - Type: "[]string", + Name: "MaxPreCommitGasFee", + Type: "types.FIL", Comment: ``, }, { - Name: "ProtectedPeers", - Type: "[]string", + Name: "MaxCommitGasFee", + Type: "types.FIL", Comment: ``, }, { - Name: "DisableNatPortMap", - Type: "bool", + Name: "MaxPreCommitBatchGasFee", + Type: "BatchFeeConfig", - Comment: `When not disabled (default), lotus asks NAT devices (e.g., routers), to -open up an external port and forward it to the port lotus is running on. -When this works (i.e., when your router supports NAT port forwarding), -it makes the local lotus node accessible from the public internet`, + Comment: `maxBatchFee = maxBase + maxPerSector * nSectors`, }, { - Name: "ConnMgrLow", - Type: "uint", + Name: "MaxCommitBatchGasFee", + Type: "BatchFeeConfig", - Comment: `ConnMgrLow is the number of connections that the basic connection manager -will trim down to.`, + Comment: ``, }, { - Name: "ConnMgrHigh", - Type: "uint", + Name: "MaxTerminateGasFee", + Type: "types.FIL", - Comment: `ConnMgrHigh is the number of connections that, when exceeded, will trigger -a connection GC operation. Note: protected/recently formed connections don't -count towards this limit.`, + Comment: ``, }, { - Name: "ConnMgrGrace", - Type: "Duration", + Name: "MaxWindowPoStGasFee", + Type: "types.FIL", - Comment: `ConnMgrGrace is a time duration that new connections are immune from being -closed by the connection manager.`, + Comment: `WindowPoSt is a high-value operation, so the default fee should be high.`, }, - }, - "Logging": { { - Name: "SubsystemLevels", - Type: "map[string]string", + Name: "MaxPublishDealsFee", + Type: "types.FIL", - Comment: `SubsystemLevels specify per-subsystem log levels`, + Comment: ``, }, }, "MinerAddressConfig": { @@ -1176,6 +998,168 @@ When disabled and no external block producers are configured, all potential block rewards will be missed!`, }, }, + "ProviderSubsystemsConfig": { + { + Name: "EnableWindowPost", + Type: "bool", + + Comment: `EnableWindowPost enables window post to be executed on this lotus-provider instance. Each machine in the cluster +with WindowPoSt enabled will also participate in the window post scheduler. It is possible to have multiple +machines with WindowPoSt enabled which will provide redundancy, and in case of multiple partitions per deadline, +will allow for parallel processing of partitions. + +It is possible to have instances handling both WindowPoSt and WinningPoSt, which can provide redundancy without +the need for additional machines. In setups like this it is generally recommended to run +partitionsPerDeadline+1 machines.`, + }, + { + Name: "WindowPostMaxTasks", + Type: "int", + + Comment: ``, + }, + { + Name: "EnableWinningPost", + Type: "bool", + + Comment: `EnableWinningPost enables winning post to be executed on this lotus-provider instance. +Each machine in the cluster with WinningPoSt enabled will also participate in the winning post scheduler. +It is possible to mix machines with WindowPoSt and WinningPoSt enabled, for details see the EnableWindowPost +documentation.`, + }, + { + Name: "WinningPostMaxTasks", + Type: "int", + + Comment: ``, + }, + { + Name: "EnableSealSDR", + Type: "bool", + + Comment: `EnableSealSDR enables SDR tasks to run. SDR is the long sequential computation +creating 11 layer files in sector cache directory. + +SDR is the first task in the sealing pipeline. It's inputs are just the hash of the +unsealed data (CommD), sector number, miner id, and the seal proof type. +It's outputs are the 11 layer files in the sector cache directory. + +In lotus-miner this was run as part of PreCommit1.`, + }, + { + Name: "SealSDRMaxTasks", + Type: "int", + + Comment: `The maximum amount of SDR tasks that can run simultaneously. Note that the maximum number of tasks will +also be bounded by resources available on the machine.`, + }, + { + Name: "EnableSealSDRTrees", + Type: "bool", + + Comment: `EnableSealSDRTrees enables the SDR pipeline tree-building task to run. +This task handles encoding of unsealed data into last sdr layer and building +of TreeR, TreeC and TreeD. + +This task runs after SDR +TreeD is first computed with optional input of unsealed data +TreeR is computed from replica, which is first computed as field +addition of the last SDR layer and the bottom layer of TreeD (which is the unsealed data) +TreeC is computed from the 11 SDR layers +The 3 trees will later be used to compute the PoRep proof. + +In case of SyntheticPoRep challenges for PoRep will be pre-generated at this step, and trees and layers +will be dropped. SyntheticPoRep works by pre-generating a very large set of challenges (~30GiB on disk) +then using a small subset of them for the actual PoRep computation. This allows for significant scratch space +saving between PreCommit and PoRep generation at the expense of more computation (generating challenges in this step) + +In lotus-miner this was run as part of PreCommit2 (TreeD was run in PreCommit1). +Note that nodes with SDRTrees enabled will also answer to Finalize tasks, +which just remove unneeded tree data after PoRep is computed.`, + }, + { + Name: "SealSDRTreesMaxTasks", + Type: "int", + + Comment: `The maximum amount of SealSDRTrees tasks that can run simultaneously. Note that the maximum number of tasks will +also be bounded by resources available on the machine.`, + }, + { + Name: "FinalizeMaxTasks", + Type: "int", + + Comment: `FinalizeMaxTasks is the maximum amount of finalize tasks that can run simultaneously. +The finalize task is enabled on all machines which also handle SDRTrees tasks. Finalize ALWAYS runs on whichever +machine holds sector cache files, as it removes unneeded tree data after PoRep is computed. +Finalize will run in parallel with the SubmitCommitMsg task.`, + }, + { + Name: "EnableSendPrecommitMsg", + Type: "bool", + + Comment: `EnableSendPrecommitMsg enables the sending of precommit messages to the chain +from this lotus-provider instance. +This runs after SDRTrees and uses the output CommD / CommR (roots of TreeD / TreeR) for the message`, + }, + { + Name: "EnablePoRepProof", + Type: "bool", + + Comment: `EnablePoRepProof enables the computation of the porep proof + +This task runs after interactive-porep seed becomes available, which happens 150 epochs (75min) after the +precommit message lands on chain. This task should run on a machine with a GPU. Vanilla PoRep proofs are +requested from the machine which holds sector cache files which most likely is the machine which ran the SDRTrees +task. + +In lotus-miner this was Commit1 / Commit2`, + }, + { + Name: "PoRepProofMaxTasks", + Type: "int", + + Comment: `The maximum amount of PoRepProof tasks that can run simultaneously. Note that the maximum number of tasks will +also be bounded by resources available on the machine.`, + }, + { + Name: "EnableSendCommitMsg", + Type: "bool", + + Comment: `EnableSendCommitMsg enables the sending of commit messages to the chain +from this lotus-provider instance.`, + }, + { + Name: "EnableMoveStorage", + Type: "bool", + + Comment: `EnableMoveStorage enables the move-into-long-term-storage task to run on this lotus-provider instance. +This tasks should only be enabled on nodes with long-term storage. + +The MoveStorage task is the last task in the sealing pipeline. It moves the sealed sector data from the +SDRTrees machine into long-term storage. This task runs after the Finalize task.`, + }, + { + Name: "MoveStorageMaxTasks", + Type: "int", + + Comment: `The maximum amount of MoveStorage tasks that can run simultaneously. Note that the maximum number of tasks will +also be bounded by resources available on the machine. It is recommended that this value is set to a number which +uses all available network (or disk) bandwidth on the machine without causing bottlenecks.`, + }, + { + Name: "EnableWebGui", + Type: "bool", + + Comment: `EnableWebGui enables the web GUI on this lotus-provider instance. The UI has minimal local overhead, but it should +only need to be run on a single machine in the cluster.`, + }, + { + Name: "GuiAddress", + Type: "string", + + Comment: `The address that should listen for Web GUI requests.`, + }, + }, "ProvingConfig": { { Name: "ParallelCheckLimit", diff --git a/node/config/load.go b/node/config/load.go index 96a0429410f..fd015d53328 100644 --- a/node/config/load.go +++ b/node/config/load.go @@ -266,7 +266,6 @@ func ConfigUpdate(cfgCur, cfgDef interface{}, opts ...UpdateCfgOpt) ([]byte, err } // sanity-check that the updated config parses the same way as the current one - if cfgDef != nil { cfgUpdated, err := FromReader(strings.NewReader(nodeStr), cfgDef) if err != nil { @@ -274,7 +273,7 @@ func ConfigUpdate(cfgCur, cfgDef interface{}, opts ...UpdateCfgOpt) ([]byte, err } if !reflect.DeepEqual(cfgCur, cfgUpdated) { - return nil, xerrors.Errorf("updated config didn't match current config:") + return nil, xerrors.Errorf("updated config didn't match current config") } } diff --git a/node/config/types.go b/node/config/types.go index b86da656933..789d24103dc 100644 --- a/node/config/types.go +++ b/node/config/types.go @@ -66,13 +66,13 @@ type StorageMiner struct { HarmonyDB HarmonyDB } -type CurioConfig struct { - Subsystems CurioSubsystemsConfig +type LotusProviderConfig struct { + Subsystems ProviderSubsystemsConfig - Fees CurioFees + Fees LotusProviderFees // Addresses of wallets per MinerAddress (one of the fields). - Addresses []CurioAddresses + Addresses []LotusProviderAddresses Proving ProvingConfig Journal JournalConfig Apis ApisConfig @@ -93,7 +93,7 @@ type JournalConfig struct { DisabledEvents string } -type CurioSubsystemsConfig struct { +type ProviderSubsystemsConfig struct { // EnableWindowPost enables window post to be executed on this lotus-provider instance. Each machine in the cluster // with WindowPoSt enabled will also participate in the window post scheduler. It is possible to have multiple // machines with WindowPoSt enabled which will provide redundancy, and in case of multiple partitions per deadline, @@ -112,14 +112,6 @@ type CurioSubsystemsConfig struct { EnableWinningPost bool WinningPostMaxTasks int - // EnableParkPiece enables the "piece parking" task to run on this node. This task is responsible for fetching - // pieces from the network and storing them in the storage subsystem until sectors are sealed. This task is - // only applicable when integrating with boost, and should be enabled on nodes which will hold deal data - // from boost until sectors containing the related pieces have the TreeD/TreeR constructed. - // Note that future Curio implementations will have a separate task type for fetching pieces from the internet. - EnableParkPiece bool - ParkPieceMaxTasks int - // EnableSealSDR enables SDR tasks to run. SDR is the long sequential computation // creating 11 layer files in sector cache directory. // @@ -671,7 +663,7 @@ type MinerFeeConfig struct { MaximizeWindowPoStFeeCap bool } -type CurioFees struct { +type LotusProviderFees struct { DefaultMaxFee types.FIL MaxPreCommitGasFee types.FIL MaxCommitGasFee types.FIL @@ -703,7 +695,7 @@ type MinerAddressConfig struct { DisableWorkerFallback bool } -type CurioAddresses struct { +type LotusProviderAddresses struct { // Addresses to send PreCommit messages from PreCommitControl []string // Addresses to send Commit messages from diff --git a/node/impl/full/actor_events.go b/node/impl/full/actor_events.go index bb192a4cf28..fecd1d2b6ad 100644 --- a/node/impl/full/actor_events.go +++ b/node/impl/full/actor_events.go @@ -18,8 +18,8 @@ import ( ) type ActorEventAPI interface { - GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) - SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) + GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) + SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) } var ( @@ -89,7 +89,7 @@ func NewActorEventHandlerWithClock( } } -func (a *ActorEventHandler) GetActorEventsRaw(ctx context.Context, evtFilter *types.ActorEventFilter) ([]*types.ActorEvent, error) { +func (a *ActorEventHandler) GetActorEvents(ctx context.Context, evtFilter *types.ActorEventFilter) ([]*types.ActorEvent, error) { if a.eventFilterManager == nil { return nil, api.ErrNotSupported } @@ -200,7 +200,7 @@ func parseHeightRange(heaviest abi.ChainEpoch, fromHeight, toHeight *abi.ChainEp return minHeight, maxHeight, nil } -func (a *ActorEventHandler) SubscribeActorEventsRaw(ctx context.Context, evtFilter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { +func (a *ActorEventHandler) SubscribeActorEvents(ctx context.Context, evtFilter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { if a.eventFilterManager == nil { return nil, api.ErrNotSupported } diff --git a/node/impl/full/actor_events_test.go b/node/impl/full/actor_events_test.go index b4c4e103c0c..ab446e57b4a 100644 --- a/node/impl/full/actor_events_test.go +++ b/node/impl/full/actor_events_test.go @@ -131,7 +131,7 @@ func TestParseHeightRange(t *testing.T) { } } -func TestGetActorEventsRaw(t *testing.T) { +func TestGetActorEvents(t *testing.T) { ctx := context.Background() req := require.New(t) @@ -231,7 +231,7 @@ func TestGetActorEventsRaw(t *testing.T) { handler := NewActorEventHandler(chain, efm, 50*time.Millisecond, maxFilterHeightRange) - gotEvents, err := handler.GetActorEventsRaw(ctx, tc.filter) + gotEvents, err := handler.GetActorEvents(ctx, tc.filter) if tc.expectErr != "" { req.Error(err) req.Contains(err.Error(), tc.expectErr) @@ -245,7 +245,7 @@ func TestGetActorEventsRaw(t *testing.T) { } } -func TestSubscribeActorEventsRaw(t *testing.T) { +func TestSubscribeActorEvents(t *testing.T) { const ( seed = 984651320 maxFilterHeightRange = 100 @@ -300,7 +300,7 @@ func TestSubscribeActorEventsRaw(t *testing.T) { if tc.endEpoch >= 0 { aef.ToHeight = epochPtr(tc.endEpoch) } - eventChan, err := handler.SubscribeActorEventsRaw(ctx, aef) + eventChan, err := handler.SubscribeActorEvents(ctx, aef) req.NoError(err) // assume we can cleanly pick up all historical events in one go @@ -411,8 +411,8 @@ func TestSubscribeActorEventsRaw(t *testing.T) { } } -func TestSubscribeActorEventsRaw_OnlyHistorical(t *testing.T) { - // Similar to TestSubscribeActorEventsRaw but we set an explicit end that caps out at the current height +func TestSubscribeActorEvents_OnlyHistorical(t *testing.T) { + // Similar to TestSubscribeActorEvents but we set an explicit end that caps out at the current height const ( seed = 984651320 maxFilterHeightRange = 100 @@ -458,7 +458,7 @@ func TestSubscribeActorEventsRaw_OnlyHistorical(t *testing.T) { handler := NewActorEventHandlerWithClock(mockChain, mockFilterManager, blockDelay, maxFilterHeightRange, mockClock) aef := &types.ActorEventFilter{FromHeight: epochPtr(0), ToHeight: epochPtr(currentHeight)} - eventChan, err := handler.SubscribeActorEventsRaw(ctx, aef) + eventChan, err := handler.SubscribeActorEvents(ctx, aef) req.NoError(err) var gotEvents []*types.ActorEvent diff --git a/node/impl/full/dummy.go b/node/impl/full/dummy.go index 1c191afba09..abe52dec6b8 100644 --- a/node/impl/full/dummy.go +++ b/node/impl/full/dummy.go @@ -194,11 +194,11 @@ var ErrActorEventModuleDisabled = errors.New("module disabled, enable with Event type ActorEventDummy struct{} -func (a *ActorEventDummy) GetActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) { +func (a *ActorEventDummy) GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) { return nil, ErrActorEventModuleDisabled } -func (a *ActorEventDummy) SubscribeActorEventsRaw(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { +func (a *ActorEventDummy) SubscribeActorEvents(ctx context.Context, filter *types.ActorEventFilter) (<-chan *types.ActorEvent, error) { return nil, ErrActorEventModuleDisabled } diff --git a/node/impl/full/eth_events.go b/node/impl/full/eth_events.go index 063590d8dd2..54dd164acf4 100644 --- a/node/impl/full/eth_events.go +++ b/node/impl/full/eth_events.go @@ -39,9 +39,9 @@ func ethLogFromEvent(entries []types.EventEntry) (data []byte, topics []ethtypes // Topics must be non-nil, even if empty. So we might as well pre-allocate for 4 (the max). topics = make([]ethtypes.EthHash, 0, 4) for _, entry := range entries { - // Drop events with non-raw topics. Built-in actors emit CBOR, and anything else would be - // invalid anyway. + // Drop events with non-raw topics to avoid mistakes. if entry.Codec != cid.Raw { + log.Warnw("did not expect an event entry with a non-raw codec", "codec", entry.Codec, "key", entry.Key) return nil, nil, false } // Check if the key is t1..t4 @@ -121,10 +121,6 @@ func ethFilterResultFromEvents(ctx context.Context, evs []*filter.CollectedEvent if err != nil { return nil, err } - if log.TransactionHash == ethtypes.EmptyEthHash { - // We've garbage collected the message, ignore the events and continue. - continue - } c, err := ev.TipSetKey.Cid() if err != nil { return nil, err diff --git a/node/modules/storageminer_svc.go b/node/modules/storageminer_svc.go index 1a909b4ec93..99a435a0c86 100644 --- a/node/modules/storageminer_svc.go +++ b/node/modules/storageminer_svc.go @@ -15,11 +15,11 @@ import ( "github.com/filecoin-project/lotus/api/v1api" "github.com/filecoin-project/lotus/chain/types" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/curiosrc/market" - "github.com/filecoin-project/lotus/curiosrc/market/fakelm" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" "github.com/filecoin-project/lotus/node/modules/helpers" + "github.com/filecoin-project/lotus/provider/lpmarket" + "github.com/filecoin-project/lotus/provider/lpmarket/fakelm" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer/storiface" "github.com/filecoin-project/lotus/storage/sectorblocks" @@ -69,7 +69,7 @@ func connectHarmony(apiInfo string, fapi v1api.FullNode, mctx helpers.MetricsCtx return nil, xerrors.Errorf("parsing miner address: %w", err) } - pin := market.NewPieceIngester(db, fapi) + pin := lpmarket.NewPieceIngester(db, fapi) si := paths.NewDBIndex(nil, db) diff --git a/node/repo/fsrepo.go b/node/repo/fsrepo.go index 6cac14c0133..d8e41fb2bdf 100644 --- a/node/repo/fsrepo.go +++ b/node/repo/fsrepo.go @@ -185,28 +185,28 @@ func (worker) APIInfoEnvVars() (primary string, fallbacks []string, deprecated [ return "WORKER_API_INFO", nil, nil } -type curio struct{} +type provider struct{} -var Curio curio +var Provider provider -func (curio) Type() string { - return "Curio" +func (provider) Type() string { + return "Provider" } -func (curio) Config() interface{} { +func (provider) Config() interface{} { return &struct{}{} } -func (curio) APIFlags() []string { - return []string{"curio-api-url"} +func (provider) APIFlags() []string { + return []string{"provider-api-url"} } -func (curio) RepoFlags() []string { - return []string{"curio-repo"} +func (provider) RepoFlags() []string { + return []string{"provider-repo"} } -func (curio) APIInfoEnvVars() (primary string, fallbacks []string, deprecated []string) { - return "CURIO_API_INFO", nil, nil +func (provider) APIInfoEnvVars() (primary string, fallbacks []string, deprecated []string) { + return "PROVIDER_API_INFO", nil, nil } var Wallet wallet diff --git a/node/repo/interface.go b/node/repo/interface.go index 11c965bf55c..328862b9214 100644 --- a/node/repo/interface.go +++ b/node/repo/interface.go @@ -28,7 +28,7 @@ const ( var ( ErrNoAPIEndpoint = errors.New("API not running (no endpoint)") ErrNoAPIToken = errors.New("API token not set") - ErrRepoAlreadyLocked = errors.New("repo is already locked (process is already running)") + ErrRepoAlreadyLocked = errors.New("repo is already locked (lotus daemon already running)") ErrClosedRepo = errors.New("repo is no longer open") // ErrInvalidBlockstoreDomain is returned by LockedRepo#Blockstore() when diff --git a/curiosrc/address.go b/provider/address.go similarity index 89% rename from curiosrc/address.go rename to provider/address.go index 6d1738f2dc3..84a10a5d720 100644 --- a/curiosrc/address.go +++ b/provider/address.go @@ -1,4 +1,4 @@ -package curio +package provider import ( "golang.org/x/xerrors" @@ -6,11 +6,11 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/lotus/api" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/node/config" + "github.com/filecoin-project/lotus/provider/multictladdr" ) -func AddressSelector(addrConf []config.CurioAddresses) func() (*multictladdr.MultiAddressSelector, error) { +func AddressSelector(addrConf []config.LotusProviderAddresses) func() (*multictladdr.MultiAddressSelector, error) { return func() (*multictladdr.MultiAddressSelector, error) { as := &multictladdr.MultiAddressSelector{ MinerMap: make(map[address.Address]api.AddressConfig), diff --git a/provider/builder.go b/provider/builder.go new file mode 100644 index 00000000000..08f18a5d8e1 --- /dev/null +++ b/provider/builder.go @@ -0,0 +1,46 @@ +package provider + +import ( + "context" + "time" + + "github.com/filecoin-project/lotus/api" + "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/node/config" + dtypes "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/lotus/provider/chainsched" + "github.com/filecoin-project/lotus/provider/lpmessage" + "github.com/filecoin-project/lotus/provider/lpwindow" + "github.com/filecoin-project/lotus/provider/multictladdr" + "github.com/filecoin-project/lotus/storage/paths" + "github.com/filecoin-project/lotus/storage/sealer" + "github.com/filecoin-project/lotus/storage/sealer/storiface" +) + +//var log = logging.Logger("provider") + +func WindowPostScheduler(ctx context.Context, fc config.LotusProviderFees, pc config.ProvingConfig, + api api.FullNode, verif storiface.Verifier, lw *sealer.LocalWorker, sender *lpmessage.Sender, chainSched *chainsched.ProviderChainSched, + as *multictladdr.MultiAddressSelector, addresses map[dtypes.MinerAddress]bool, db *harmonydb.DB, + stor paths.Store, idx paths.SectorIndex, max int) (*lpwindow.WdPostTask, *lpwindow.WdPostSubmitTask, *lpwindow.WdPostRecoverDeclareTask, error) { + + // todo config + ft := lpwindow.NewSimpleFaultTracker(stor, idx, pc.ParallelCheckLimit, time.Duration(pc.SingleCheckTimeout), time.Duration(pc.PartitionCheckTimeout)) + + computeTask, err := lpwindow.NewWdPostTask(db, api, ft, lw, verif, chainSched, addresses, max) + if err != nil { + return nil, nil, nil, err + } + + submitTask, err := lpwindow.NewWdPostSubmitTask(chainSched, sender, db, api, fc.MaxWindowPoStGasFee, as) + if err != nil { + return nil, nil, nil, err + } + + recoverTask, err := lpwindow.NewWdPostRecoverDeclareTask(sender, db, api, ft, as, chainSched, fc.MaxWindowPoStGasFee, addresses) + if err != nil { + return nil, nil, nil, err + } + + return computeTask, submitTask, recoverTask, nil +} diff --git a/curiosrc/chainsched/chain_sched.go b/provider/chainsched/chain_sched.go similarity index 77% rename from curiosrc/chainsched/chain_sched.go rename to provider/chainsched/chain_sched.go index 42a387fbc2a..238baac5424 100644 --- a/curiosrc/chainsched/chain_sched.go +++ b/provider/chainsched/chain_sched.go @@ -14,29 +14,29 @@ import ( "github.com/filecoin-project/lotus/chain/types" ) -var log = logging.Logger("curio/chainsched") +var log = logging.Logger("chainsched") type NodeAPI interface { ChainHead(context.Context) (*types.TipSet, error) ChainNotify(context.Context) (<-chan []*api.HeadChange, error) } -type CurioChainSched struct { +type ProviderChainSched struct { api NodeAPI callbacks []UpdateFunc started bool } -func New(api NodeAPI) *CurioChainSched { - return &CurioChainSched{ +func New(api NodeAPI) *ProviderChainSched { + return &ProviderChainSched{ api: api, } } type UpdateFunc func(ctx context.Context, revert, apply *types.TipSet) error -func (s *CurioChainSched) AddHandler(ch UpdateFunc) error { +func (s *ProviderChainSched) AddHandler(ch UpdateFunc) error { if s.started { return xerrors.Errorf("cannot add handler after start") } @@ -45,7 +45,7 @@ func (s *CurioChainSched) AddHandler(ch UpdateFunc) error { return nil } -func (s *CurioChainSched) Run(ctx context.Context) { +func (s *ProviderChainSched) Run(ctx context.Context) { s.started = true var ( @@ -88,7 +88,7 @@ func (s *CurioChainSched) Run(ctx context.Context) { continue } - ctx, span := trace.StartSpan(ctx, "CurioChainSched.headChange") + ctx, span := trace.StartSpan(ctx, "ProviderChainSched.headChange") s.update(ctx, nil, chg.Val) @@ -97,7 +97,7 @@ func (s *CurioChainSched) Run(ctx context.Context) { continue } - ctx, span := trace.StartSpan(ctx, "CurioChainSched.headChange") + ctx, span := trace.StartSpan(ctx, "ProviderChainSched.headChange") var lowest, highest *types.TipSet = nil, nil @@ -122,15 +122,15 @@ func (s *CurioChainSched) Run(ctx context.Context) { } } -func (s *CurioChainSched) update(ctx context.Context, revert, apply *types.TipSet) { +func (s *ProviderChainSched) update(ctx context.Context, revert, apply *types.TipSet) { if apply == nil { - log.Error("no new tipset in CurioChainSched.update") + log.Error("no new tipset in ProviderChainSched.update") return } for _, ch := range s.callbacks { if err := ch(ctx, revert, apply); err != nil { - log.Errorf("handling head updates in curio chain sched: %+v", err) + log.Errorf("handling head updates in provider chain sched: %+v", err) } } } diff --git a/curiosrc/ffi/sdr_funcs.go b/provider/lpffi/sdr_funcs.go similarity index 97% rename from curiosrc/ffi/sdr_funcs.go rename to provider/lpffi/sdr_funcs.go index 199f88afecc..05a7bbd8053 100644 --- a/curiosrc/ffi/sdr_funcs.go +++ b/provider/lpffi/sdr_funcs.go @@ -1,4 +1,4 @@ -package ffi +package lpffi import ( "context" @@ -19,8 +19,8 @@ import ( "github.com/filecoin-project/go-state-types/abi" proof2 "github.com/filecoin-project/go-state-types/proof" - "github.com/filecoin-project/lotus/curiosrc/proof" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" + "github.com/filecoin-project/lotus/provider/lpproof" "github.com/filecoin-project/lotus/storage/paths" "github.com/filecoin-project/lotus/storage/sealer/proofpaths" "github.com/filecoin-project/lotus/storage/sealer/storiface" @@ -42,7 +42,7 @@ type SealCalls struct { externCalls ExternalSealer*/ } -func NewSealCalls(st *paths.Remote, ls *paths.Local, si paths.SectorIndex) *SealCalls { +func NewSealCalls(st paths.Store, ls *paths.Local, si paths.SectorIndex) *SealCalls { return &SealCalls{ sectors: &storageProvider{ storage: st, @@ -54,7 +54,7 @@ func NewSealCalls(st *paths.Remote, ls *paths.Local, si paths.SectorIndex) *Seal } type storageProvider struct { - storage *paths.Remote + storage paths.Store localStore *paths.Local sindex paths.SectorIndex storageReservations *xsync.MapOf[harmonytask.TaskID, *StorageReservation] @@ -69,7 +69,7 @@ func (l *storageProvider) AcquireSector(ctx context.Context, taskID *harmonytask if taskID != nil { resv, ok = l.storageReservations.Load(*taskID) } - if ok && resv != nil { + if ok { if resv.Alloc != allocate || resv.Existing != existing { // this should never happen, only when task definition is wrong return storiface.SectorPaths{}, nil, xerrors.Errorf("storage reservation type mismatch") @@ -78,7 +78,6 @@ func (l *storageProvider) AcquireSector(ctx context.Context, taskID *harmonytask log.Debugw("using existing storage reservation", "task", taskID, "sector", sector, "existing", existing, "allocate", allocate) paths = resv.Paths - storageIDs = resv.PathIDs releaseStorage = resv.Release } else { var err error @@ -152,7 +151,7 @@ func (sb *SealCalls) TreeD(ctx context.Context, sector storiface.SectorRef, size } defer releaseSector() - return proof.BuildTreeD(data, unpaddedData, filepath.Join(paths.Cache, proofpaths.TreeDName), size) + return lpproof.BuildTreeD(data, unpaddedData, filepath.Join(paths.Cache, proofpaths.TreeDName), size) } func (sb *SealCalls) TreeRC(ctx context.Context, sector storiface.SectorRef, unsealed cid.Cid) (cid.Cid, cid.Cid, error) { diff --git a/curiosrc/ffi/task_storage.go b/provider/lpffi/task_storage.go similarity index 99% rename from curiosrc/ffi/task_storage.go rename to provider/lpffi/task_storage.go index ddc5e00a3b4..01d6671c756 100644 --- a/curiosrc/ffi/task_storage.go +++ b/provider/lpffi/task_storage.go @@ -1,4 +1,4 @@ -package ffi +package lpffi import ( "context" diff --git a/curiosrc/market/deal_ingest.go b/provider/lpmarket/deal_ingest.go similarity index 95% rename from curiosrc/market/deal_ingest.go rename to provider/lpmarket/deal_ingest.go index ea382717acc..0858cf801d2 100644 --- a/curiosrc/market/deal_ingest.go +++ b/provider/lpmarket/deal_ingest.go @@ -1,4 +1,4 @@ -package market +package lpmarket import ( "context" @@ -17,8 +17,8 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/seal" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" + "github.com/filecoin-project/lotus/provider/lpseal" ) type Ingester interface { @@ -72,7 +72,7 @@ func (p *PieceIngester) AllocatePieceToSector(ctx context.Context, maddr address return api.SectorOffset{}, xerrors.Errorf("getting miner ID: %w", err) } - num, err := seal.AllocateSectorNumbers(ctx, p.api, p.db, maddr, 1, func(tx *harmonydb.Tx, numbers []abi.SectorNumber) (bool, error) { + num, err := lpseal.AllocateSectorNumbers(ctx, p.api, p.db, maddr, 1, func(tx *harmonydb.Tx, numbers []abi.SectorNumber) (bool, error) { if len(numbers) != 1 { return false, xerrors.Errorf("expected one sector number") } diff --git a/curiosrc/market/fakelm/iface.go b/provider/lpmarket/fakelm/iface.go similarity index 100% rename from curiosrc/market/fakelm/iface.go rename to provider/lpmarket/fakelm/iface.go diff --git a/curiosrc/market/fakelm/lmimpl.go b/provider/lpmarket/fakelm/lmimpl.go similarity index 98% rename from curiosrc/market/fakelm/lmimpl.go rename to provider/lpmarket/fakelm/lmimpl.go index 1f6c5b91dee..abbc4d04d98 100644 --- a/curiosrc/market/fakelm/lmimpl.go +++ b/provider/lpmarket/fakelm/lmimpl.go @@ -20,9 +20,9 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/market" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/node/config" + "github.com/filecoin-project/lotus/provider/lpmarket" "github.com/filecoin-project/lotus/storage/paths" sealing "github.com/filecoin-project/lotus/storage/pipeline" "github.com/filecoin-project/lotus/storage/sealer/storiface" @@ -37,12 +37,12 @@ type LMRPCProvider struct { ssize abi.SectorSize - pi market.Ingester + pi lpmarket.Ingester db *harmonydb.DB confLayer string } -func NewLMRPCProvider(si paths.SectorIndex, full api.FullNode, maddr address.Address, minerID abi.ActorID, ssize abi.SectorSize, pi market.Ingester, db *harmonydb.DB, confLayer string) *LMRPCProvider { +func NewLMRPCProvider(si paths.SectorIndex, full api.FullNode, maddr address.Address, minerID abi.ActorID, ssize abi.SectorSize, pi lpmarket.Ingester, db *harmonydb.DB, confLayer string) *LMRPCProvider { return &LMRPCProvider{ si: si, full: full, @@ -343,7 +343,7 @@ func (l *LMRPCProvider) AuthNew(ctx context.Context, perms []auth.Permission) ([ return nil, xerrors.Errorf("no harmony config found") } - lp := config.DefaultCurioConfig() + lp := config.DefaultLotusProvider() if _, err := toml.Decode(cs[0].Config, lp); err != nil { return nil, xerrors.Errorf("decode harmony config: %w", err) } diff --git a/curiosrc/message/sender.go b/provider/lpmessage/sender.go similarity index 98% rename from curiosrc/message/sender.go rename to provider/lpmessage/sender.go index 614bc0be23a..97f889ecc2f 100644 --- a/curiosrc/message/sender.go +++ b/provider/lpmessage/sender.go @@ -1,4 +1,4 @@ -package message +package lpmessage import ( "bytes" @@ -22,7 +22,7 @@ import ( "github.com/filecoin-project/lotus/lib/promise" ) -var log = logging.Logger("curio/message") +var log = logging.Logger("lpmessage") var SendLockedWait = 100 * time.Millisecond @@ -187,7 +187,7 @@ func (s *SendTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done b } else { // Note: this handles an unlikely edge-case: // We have previously signed the message but either failed to send it or failed to update the db - // note that when that happens the likely cause is the curio process losing its db connection + // note that when that happens the likely cause is the provider process losing its db connection // or getting killed before it can update the db. In that case the message lock will still be held // so it will be safe to rebroadcast the signed message diff --git a/curiosrc/message/watch.go b/provider/lpmessage/watch.go similarity index 97% rename from curiosrc/message/watch.go rename to provider/lpmessage/watch.go index 2253df28434..1a04a67a1a4 100644 --- a/curiosrc/message/watch.go +++ b/provider/lpmessage/watch.go @@ -1,4 +1,4 @@ -package message +package lpmessage import ( "context" @@ -12,9 +12,9 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/chainsched" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" + "github.com/filecoin-project/lotus/provider/chainsched" ) const MinConfidence = 6 @@ -38,7 +38,7 @@ type MessageWatcher struct { bestTs atomic.Pointer[types.TipSetKey] } -func NewMessageWatcher(db *harmonydb.DB, ht *harmonytask.TaskEngine, pcs *chainsched.CurioChainSched, api MessageWaiterApi) (*MessageWatcher, error) { +func NewMessageWatcher(db *harmonydb.DB, ht *harmonytask.TaskEngine, pcs *chainsched.ProviderChainSched, api MessageWaiterApi) (*MessageWatcher, error) { mw := &MessageWatcher{ db: db, ht: ht, diff --git a/curiosrc/proof/treed_build.go b/provider/lpproof/treed_build.go similarity index 99% rename from curiosrc/proof/treed_build.go rename to provider/lpproof/treed_build.go index 59161caa997..12d0ee93e47 100644 --- a/curiosrc/proof/treed_build.go +++ b/provider/lpproof/treed_build.go @@ -1,4 +1,4 @@ -package proof +package lpproof import ( "io" diff --git a/curiosrc/proof/treed_build_test.go b/provider/lpproof/treed_build_test.go similarity index 99% rename from curiosrc/proof/treed_build_test.go rename to provider/lpproof/treed_build_test.go index f69e9832247..f9bbde20a4a 100644 --- a/curiosrc/proof/treed_build_test.go +++ b/provider/lpproof/treed_build_test.go @@ -1,4 +1,4 @@ -package proof +package lpproof import ( "bufio" diff --git a/curiosrc/seal/README.md b/provider/lpseal/README.md similarity index 100% rename from curiosrc/seal/README.md rename to provider/lpseal/README.md diff --git a/curiosrc/seal/poller.go b/provider/lpseal/poller.go similarity index 99% rename from curiosrc/seal/poller.go rename to provider/lpseal/poller.go index 568280bdbce..cbdcb3fd99a 100644 --- a/curiosrc/seal/poller.go +++ b/provider/lpseal/poller.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "context" diff --git a/curiosrc/seal/poller_commit_msg.go b/provider/lpseal/poller_commit_msg.go similarity index 99% rename from curiosrc/seal/poller_commit_msg.go rename to provider/lpseal/poller_commit_msg.go index 9a88129b04e..19784e71911 100644 --- a/curiosrc/seal/poller_commit_msg.go +++ b/provider/lpseal/poller_commit_msg.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "context" diff --git a/curiosrc/seal/poller_precommit_msg.go b/provider/lpseal/poller_precommit_msg.go similarity index 99% rename from curiosrc/seal/poller_precommit_msg.go rename to provider/lpseal/poller_precommit_msg.go index 4372cbb9223..22deadc0eb7 100644 --- a/curiosrc/seal/poller_precommit_msg.go +++ b/provider/lpseal/poller_precommit_msg.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "context" diff --git a/curiosrc/seal/sector_num_alloc.go b/provider/lpseal/sector_num_alloc.go similarity index 99% rename from curiosrc/seal/sector_num_alloc.go rename to provider/lpseal/sector_num_alloc.go index 010ebee395d..6958a5e6b15 100644 --- a/curiosrc/seal/sector_num_alloc.go +++ b/provider/lpseal/sector_num_alloc.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "context" diff --git a/curiosrc/seal/task_finalize.go b/provider/lpseal/task_finalize.go similarity index 91% rename from curiosrc/seal/task_finalize.go rename to provider/lpseal/task_finalize.go index 2b362d7bead..8d425f76add 100644 --- a/curiosrc/seal/task_finalize.go +++ b/provider/lpseal/task_finalize.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "context" @@ -7,21 +7,21 @@ import ( "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/lotus/curiosrc/ffi" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpffi" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) type FinalizeTask struct { max int sp *SealPoller - sc *ffi.SealCalls + sc *lpffi.SealCalls db *harmonydb.DB } -func NewFinalizeTask(max int, sp *SealPoller, sc *ffi.SealCalls, db *harmonydb.DB) *FinalizeTask { +func NewFinalizeTask(max int, sp *SealPoller, sc *lpffi.SealCalls, db *harmonydb.DB) *FinalizeTask { return &FinalizeTask{ max: max, sp: sp, @@ -69,10 +69,6 @@ func (f *FinalizeTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (do return false, xerrors.Errorf("finalizing sector: %w", err) } - if err := DropSectorPieceRefs(ctx, f.db, sector.ID); err != nil { - return false, xerrors.Errorf("dropping sector piece refs: %w", err) - } - // set after_finalize _, err = f.db.Exec(ctx, `update sectors_sdr_pipeline set after_finalize=true where task_id_finalize=$1`, taskID) if err != nil { @@ -90,7 +86,7 @@ func (f *FinalizeTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.T StorageID string `db:"storage_id"` } - if storiface.FTCache != 4 { + if 4 != storiface.FTCache { panic("storiface.FTCache != 4") } diff --git a/curiosrc/seal/task_movestorage.go b/provider/lpseal/task_movestorage.go similarity index 94% rename from curiosrc/seal/task_movestorage.go rename to provider/lpseal/task_movestorage.go index 9092ec82945..2085214b7ab 100644 --- a/curiosrc/seal/task_movestorage.go +++ b/provider/lpseal/task_movestorage.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "context" @@ -7,22 +7,22 @@ import ( "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/lotus/curiosrc/ffi" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpffi" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) type MoveStorageTask struct { sp *SealPoller - sc *ffi.SealCalls + sc *lpffi.SealCalls db *harmonydb.DB max int } -func NewMoveStorageTask(sp *SealPoller, sc *ffi.SealCalls, db *harmonydb.DB, max int) *MoveStorageTask { +func NewMoveStorageTask(sp *SealPoller, sc *lpffi.SealCalls, db *harmonydb.DB, max int) *MoveStorageTask { return &MoveStorageTask{ max: max, sp: sp, diff --git a/curiosrc/seal/task_porep.go b/provider/lpseal/task_porep.go similarity index 97% rename from curiosrc/seal/task_porep.go rename to provider/lpseal/task_porep.go index fb03ce59bb0..ba0283e0c0d 100644 --- a/curiosrc/seal/task_porep.go +++ b/provider/lpseal/task_porep.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "bytes" @@ -12,10 +12,10 @@ import ( "github.com/filecoin-project/go-state-types/crypto" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/ffi" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpffi" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) @@ -28,12 +28,12 @@ type PoRepTask struct { db *harmonydb.DB api PoRepAPI sp *SealPoller - sc *ffi.SealCalls + sc *lpffi.SealCalls max int } -func NewPoRepTask(db *harmonydb.DB, api PoRepAPI, sp *SealPoller, sc *ffi.SealCalls, maxPoRep int) *PoRepTask { +func NewPoRepTask(db *harmonydb.DB, api PoRepAPI, sp *SealPoller, sc *lpffi.SealCalls, maxPoRep int) *PoRepTask { return &PoRepTask{ db: db, api: api, diff --git a/curiosrc/seal/task_sdr.go b/provider/lpseal/task_sdr.go similarity index 93% rename from curiosrc/seal/task_sdr.go rename to provider/lpseal/task_sdr.go index 4c1164e0581..694ff6f46a7 100644 --- a/curiosrc/seal/task_sdr.go +++ b/provider/lpseal/task_sdr.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "bytes" @@ -16,10 +16,10 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/ffi" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpffi" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) @@ -35,12 +35,12 @@ type SDRTask struct { db *harmonydb.DB sp *SealPoller - sc *ffi.SealCalls + sc *lpffi.SealCalls max int } -func NewSDRTask(api SDRAPI, db *harmonydb.DB, sp *SealPoller, sc *ffi.SealCalls, maxSDR int) *SDRTask { +func NewSDRTask(api SDRAPI, db *harmonydb.DB, sp *SealPoller, sc *lpffi.SealCalls, maxSDR int) *SDRTask { return &SDRTask{ api: api, db: db, @@ -187,6 +187,8 @@ func (s *SDRTask) getTicket(ctx context.Context, maddr address.Address) (abi.Sea } func (s *SDRTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error) { + // todo check storage (reserve too?) + id := ids[0] return &id, nil } @@ -221,16 +223,16 @@ func (s *SDRTask) Adder(taskFunc harmonytask.AddTaskFunc) { s.sp.pollers[pollerSDR].Set(taskFunc) } -func (s *SDRTask) taskToSector(id harmonytask.TaskID) (ffi.SectorRef, error) { - var refs []ffi.SectorRef +func (s *SDRTask) taskToSector(id harmonytask.TaskID) (lpffi.SectorRef, error) { + var refs []lpffi.SectorRef err := s.db.Select(context.Background(), &refs, `SELECT sp_id, sector_number, reg_seal_proof FROM sectors_sdr_pipeline WHERE task_id_sdr = $1`, id) if err != nil { - return ffi.SectorRef{}, xerrors.Errorf("getting sector ref: %w", err) + return lpffi.SectorRef{}, xerrors.Errorf("getting sector ref: %w", err) } if len(refs) != 1 { - return ffi.SectorRef{}, xerrors.Errorf("expected 1 sector ref, got %d", len(refs)) + return lpffi.SectorRef{}, xerrors.Errorf("expected 1 sector ref, got %d", len(refs)) } return refs[0], nil diff --git a/curiosrc/seal/task_submit_commit.go b/provider/lpseal/task_submit_commit.go similarity index 94% rename from curiosrc/seal/task_submit_commit.go rename to provider/lpseal/task_submit_commit.go index d7f133db71c..5b46b7e009c 100644 --- a/curiosrc/seal/task_submit_commit.go +++ b/provider/lpseal/task_submit_commit.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "bytes" @@ -14,11 +14,11 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/message" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpmessage" + "github.com/filecoin-project/lotus/provider/multictladdr" "github.com/filecoin-project/lotus/storage/ctladdr" ) @@ -35,13 +35,13 @@ type SubmitCommitTask struct { db *harmonydb.DB api SubmitCommitAPI - sender *message.Sender + sender *lpmessage.Sender as *multictladdr.MultiAddressSelector maxFee types.FIL } -func NewSubmitCommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitCommitAPI, sender *message.Sender, as *multictladdr.MultiAddressSelector, maxFee types.FIL) *SubmitCommitTask { +func NewSubmitCommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitCommitAPI, sender *lpmessage.Sender, as *multictladdr.MultiAddressSelector, maxFee types.FIL) *SubmitCommitTask { return &SubmitCommitTask{ sp: sp, db: db, diff --git a/curiosrc/seal/task_submit_precommit.go b/provider/lpseal/task_submit_precommit.go similarity index 83% rename from curiosrc/seal/task_submit_precommit.go rename to provider/lpseal/task_submit_precommit.go index 9cc8d446b6b..9f6233f39d0 100644 --- a/curiosrc/seal/task_submit_precommit.go +++ b/provider/lpseal/task_submit_precommit.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "bytes" @@ -9,28 +9,24 @@ import ( "github.com/filecoin-project/go-address" "github.com/filecoin-project/go-state-types/abi" - actorstypes "github.com/filecoin-project/go-state-types/actors" "github.com/filecoin-project/go-state-types/big" "github.com/filecoin-project/go-state-types/builtin" miner12 "github.com/filecoin-project/go-state-types/builtin/v12/miner" - "github.com/filecoin-project/go-state-types/network" "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" - "github.com/filecoin-project/lotus/chain/actors/policy" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/message" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpmessage" + "github.com/filecoin-project/lotus/provider/multictladdr" "github.com/filecoin-project/lotus/storage/ctladdr" ) type SubmitPrecommitTaskApi interface { StateMinerPreCommitDepositForPower(context.Context, address.Address, miner.SectorPreCommitInfo, types.TipSetKey) (big.Int, error) StateMinerInfo(context.Context, address.Address, types.TipSetKey) (api.MinerInfo, error) - StateNetworkVersion(context.Context, types.TipSetKey) (network.Version, error) ctladdr.NodeApi } @@ -38,13 +34,13 @@ type SubmitPrecommitTask struct { sp *SealPoller db *harmonydb.DB api SubmitPrecommitTaskApi - sender *message.Sender + sender *lpmessage.Sender as *multictladdr.MultiAddressSelector maxFee types.FIL } -func NewSubmitPrecommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitPrecommitTaskApi, sender *message.Sender, as *multictladdr.MultiAddressSelector, maxFee types.FIL) *SubmitPrecommitTask { +func NewSubmitPrecommitTask(sp *SealPoller, db *harmonydb.DB, api SubmitPrecommitTaskApi, sender *lpmessage.Sender, as *multictladdr.MultiAddressSelector, maxFee types.FIL) *SubmitPrecommitTask { return &SubmitPrecommitTask{ sp: sp, db: db, @@ -140,23 +136,6 @@ func (s *SubmitPrecommitTask) Do(taskID harmonytask.TaskID, stillOwned func() bo } } - nv, err := s.api.StateNetworkVersion(ctx, types.EmptyTSK) - if err != nil { - return false, xerrors.Errorf("getting network version: %w", err) - } - av, err := actorstypes.VersionForNetwork(nv) - if err != nil { - return false, xerrors.Errorf("failed to get actors version: %w", err) - } - msd, err := policy.GetMaxProveCommitDuration(av, sectorParams.RegSealProof) - if err != nil { - return false, xerrors.Errorf("failed to get max prove commit duration: %w", err) - } - - if minExpiration := sectorParams.TicketEpoch + policy.MaxPreCommitRandomnessLookback + msd + miner.MinSectorExpiration; params.Sectors[0].Expiration < minExpiration { - params.Sectors[0].Expiration = minExpiration - } - var pbuf bytes.Buffer if err := params.MarshalCBOR(&pbuf); err != nil { return false, xerrors.Errorf("serializing params: %w", err) diff --git a/curiosrc/seal/task_trees.go b/provider/lpseal/task_trees.go similarity index 78% rename from curiosrc/seal/task_trees.go rename to provider/lpseal/task_trees.go index fa22f8d4a3d..da0fcf1e9f7 100644 --- a/curiosrc/seal/task_trees.go +++ b/provider/lpseal/task_trees.go @@ -1,11 +1,9 @@ -package seal +package lpseal import ( "context" "io" "net/http" - "net/url" - "strconv" "github.com/ipfs/go-cid" "golang.org/x/xerrors" @@ -15,10 +13,10 @@ import ( "github.com/filecoin-project/go-padreader" "github.com/filecoin-project/go-state-types/abi" - "github.com/filecoin-project/lotus/curiosrc/ffi" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" + "github.com/filecoin-project/lotus/provider/lpffi" "github.com/filecoin-project/lotus/storage/pipeline/lib/nullreader" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) @@ -26,12 +24,12 @@ import ( type TreesTask struct { sp *SealPoller db *harmonydb.DB - sc *ffi.SealCalls + sc *lpffi.SealCalls max int } -func NewTreesTask(sp *SealPoller, db *harmonydb.DB, sc *ffi.SealCalls, maxTrees int) *TreesTask { +func NewTreesTask(sp *SealPoller, db *harmonydb.DB, sc *lpffi.SealCalls, maxTrees int) *TreesTask { return &TreesTask{ sp: sp, db: db, @@ -90,15 +88,6 @@ func (t *TreesTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done var dataReader io.Reader var unpaddedData bool - var closers []io.Closer - defer func() { - for _, c := range closers { - if err := c.Close(); err != nil { - log.Errorw("error closing piece reader", "error", err) - } - } - }() - if len(pieces) > 0 { pieceInfos := make([]abi.PieceInfo, len(pieces)) pieceReaders := make([]io.Reader, len(pieces)) @@ -117,49 +106,10 @@ func (t *TreesTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done // make pieceReader if p.DataUrl != nil { - dataUrl := *p.DataUrl - - goUrl, err := url.Parse(dataUrl) - if err != nil { - return false, xerrors.Errorf("parsing data URL: %w", err) - } - - if goUrl.Scheme == "pieceref" { - // url is to a piece reference - - refNum, err := strconv.ParseInt(goUrl.Opaque, 10, 64) - if err != nil { - return false, xerrors.Errorf("parsing piece reference number: %w", err) - } - - // get pieceID - var pieceID []struct { - PieceID storiface.PieceNumber `db:"piece_id"` - } - err = t.db.Select(ctx, &pieceID, `SELECT piece_id FROM parked_piece_refs WHERE ref_id = $1`, refNum) - if err != nil { - return false, xerrors.Errorf("getting pieceID: %w", err) - } - - if len(pieceID) != 1 { - return false, xerrors.Errorf("expected 1 pieceID, got %d", len(pieceID)) - } - - pr, err := t.sc.PieceReader(ctx, pieceID[0].PieceID) - if err != nil { - return false, xerrors.Errorf("getting piece reader: %w", err) - } - - closers = append(closers, pr) - - pieceReaders[i], _ = padreader.New(pr, uint64(*p.DataRawSize)) - } else { - pieceReaders[i], _ = padreader.New(&UrlPieceReader{ - Url: dataUrl, - RawSize: *p.DataRawSize, - }, uint64(*p.DataRawSize)) - } - + pieceReaders[i], _ = padreader.New(&UrlPieceReader{ + Url: *p.DataUrl, + RawSize: *p.DataRawSize, + }, uint64(*p.DataRawSize)) } else { // padding piece (w/o fr32 padding, added in TreeD) pieceReaders[i] = nullreader.NewNullReader(abi.PaddedPieceSize(p.PieceSize).Unpadded()) } @@ -250,7 +200,6 @@ type UrlPieceReader struct { RawSize int64 // the exact number of bytes read, if we read more or less that's an error readSoFar int64 - closed bool active io.ReadCloser // auto-closed on EOF } @@ -290,7 +239,6 @@ func (u *UrlPieceReader) Read(p []byte) (n int, err error) { // If EOF is reached, close the reader if err == io.EOF { cerr := u.active.Close() - u.closed = true if cerr != nil { log.Errorf("error closing http piece reader: %s", cerr) } @@ -305,13 +253,4 @@ func (u *UrlPieceReader) Read(p []byte) (n int, err error) { return n, err } -func (u *UrlPieceReader) Close() error { - if !u.closed { - u.closed = true - return u.active.Close() - } - - return nil -} - var _ harmonytask.TaskInterface = &TreesTask{} diff --git a/curiosrc/seal/task_trees_test.go b/provider/lpseal/task_trees_test.go similarity index 99% rename from curiosrc/seal/task_trees_test.go rename to provider/lpseal/task_trees_test.go index b65ddd4e858..204fa57fcf6 100644 --- a/curiosrc/seal/task_trees_test.go +++ b/provider/lpseal/task_trees_test.go @@ -1,4 +1,4 @@ -package seal +package lpseal import ( "io" diff --git a/curiosrc/web/api/debug/debug.go b/provider/lpweb/api/debug/debug.go similarity index 97% rename from curiosrc/web/api/debug/debug.go rename to provider/lpweb/api/debug/debug.go index c0e89ab8e29..84568451970 100644 --- a/curiosrc/web/api/debug/debug.go +++ b/provider/lpweb/api/debug/debug.go @@ -1,4 +1,4 @@ -// Package debug provides the API for various debug endpoints in curio. +// Package debug provides the API for various debug endpoints in lotus-provider. package debug import ( @@ -18,10 +18,10 @@ import ( "github.com/filecoin-project/lotus/api/client" "github.com/filecoin-project/lotus/build" cliutil "github.com/filecoin-project/lotus/cli/util" - "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" ) -var log = logging.Logger("curio/web/debug") +var log = logging.Logger("lp/web/debug") type debug struct { *deps.Deps diff --git a/provider/lpweb/api/routes.go b/provider/lpweb/api/routes.go new file mode 100644 index 00000000000..85b17486f70 --- /dev/null +++ b/provider/lpweb/api/routes.go @@ -0,0 +1,13 @@ +// Package api provides the HTTP API for the lotus provider web gui. +package api + +import ( + "github.com/gorilla/mux" + + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" + "github.com/filecoin-project/lotus/provider/lpweb/api/debug" +) + +func Routes(r *mux.Router, deps *deps.Deps) { + debug.Routes(r.PathPrefix("/debug").Subrouter(), deps) +} diff --git a/curiosrc/web/hapi/robust_rpc.go b/provider/lpweb/hapi/robust_rpc.go similarity index 100% rename from curiosrc/web/hapi/robust_rpc.go rename to provider/lpweb/hapi/robust_rpc.go diff --git a/curiosrc/web/hapi/routes.go b/provider/lpweb/hapi/routes.go similarity index 89% rename from curiosrc/web/hapi/routes.go rename to provider/lpweb/hapi/routes.go index fd2f24e9434..2e752935d98 100644 --- a/curiosrc/web/hapi/routes.go +++ b/provider/lpweb/hapi/routes.go @@ -8,7 +8,7 @@ import ( logging "github.com/ipfs/go-log/v2" "golang.org/x/xerrors" - "github.com/filecoin-project/lotus/cmd/curio/deps" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" ) //go:embed web/* @@ -39,4 +39,4 @@ func Routes(r *mux.Router, deps *deps.Deps) error { return nil } -var log = logging.Logger("curio/web") +var log = logging.Logger("lpweb") diff --git a/curiosrc/web/hapi/simpleinfo.go b/provider/lpweb/hapi/simpleinfo.go similarity index 79% rename from curiosrc/web/hapi/simpleinfo.go rename to provider/lpweb/hapi/simpleinfo.go index fd6635059f2..ff76ae990f0 100644 --- a/curiosrc/web/hapi/simpleinfo.go +++ b/provider/lpweb/hapi/simpleinfo.go @@ -5,7 +5,6 @@ import ( "html/template" "net/http" "os" - "sort" "sync" "time" @@ -33,10 +32,6 @@ type actorInfo struct { QualityAdjustedPower string RawBytePower string - ActorBalance, ActorAvailable, WorkerBalance string - - Win1, Win7, Win30 int64 - Deadlines []actorDeadline } @@ -103,7 +98,7 @@ var templateDev = os.Getenv("LOTUS_WEB_DEV") == "1" func (a *app) executeTemplate(w http.ResponseWriter, name string, data interface{}) { if templateDev { - fs := os.DirFS("./cmd/curio/web/hapi/web") + fs := os.DirFS("./provider/lpweb/hapi/web") a.t = template.Must(template.ParseFS(fs, "*")) } if err := a.t.ExecuteTemplate(w, name, data); err != nil { @@ -112,18 +107,10 @@ func (a *app) executeTemplate(w http.ResponseWriter, name string, data interface } } -type machineRecentTask struct { - TaskName string - Success int64 - Fail int64 -} - type machineSummary struct { Address string ID int64 SinceContact string - - RecentTasks []*machineRecentTask } type taskSummary struct { @@ -146,47 +133,7 @@ type taskHistorySummary struct { } func (a *app) clusterMachineSummary(ctx context.Context) ([]machineSummary, error) { - // First get task summary for tasks completed in the last 24 hours - // NOTE: This query uses harmony_task_history_work_index, task history may get big - tsrows, err := a.db.Query(ctx, `SELECT hist.completed_by_host_and_port, hist.name, hist.result, count(1) FROM harmony_task_history hist - WHERE hist.work_end > now() - INTERVAL '1 day' - GROUP BY hist.completed_by_host_and_port, hist.name, hist.result - ORDER BY completed_by_host_and_port ASC`) - if err != nil { - return nil, err - } - defer tsrows.Close() - - // Map of machine -> task -> recent task - taskSummaries := map[string]map[string]*machineRecentTask{} - - for tsrows.Next() { - var taskName string - var result bool - var count int64 - var machine string - - if err := tsrows.Scan(&machine, &taskName, &result, &count); err != nil { - return nil, err - } - - if _, ok := taskSummaries[machine]; !ok { - taskSummaries[machine] = map[string]*machineRecentTask{} - } - - if _, ok := taskSummaries[machine][taskName]; !ok { - taskSummaries[machine][taskName] = &machineRecentTask{TaskName: taskName} - } - - if result { - taskSummaries[machine][taskName].Success = count - } else { - taskSummaries[machine][taskName].Fail = count - } - } - - // Then machine summary - rows, err := a.db.Query(ctx, "SELECT id, host_and_port, last_contact FROM harmony_machines order by host_and_port asc") + rows, err := a.db.Query(ctx, "SELECT id, host_and_port, last_contact FROM harmony_machines") if err != nil { return nil, err // Handle error } @@ -203,16 +150,6 @@ func (a *app) clusterMachineSummary(ctx context.Context) ([]machineSummary, erro m.SinceContact = time.Since(lastContact).Round(time.Second).String() - // Add recent tasks - if ts, ok := taskSummaries[m.Address]; ok { - for _, t := range ts { - m.RecentTasks = append(m.RecentTasks, t) - } - sort.Slice(m.RecentTasks, func(i, j int) bool { - return m.RecentTasks[i].TaskName < m.RecentTasks[j].TaskName - }) - } - summaries = append(summaries, m) } return summaries, nil diff --git a/curiosrc/web/hapi/simpleinfo_pipeline_porep.go b/provider/lpweb/hapi/simpleinfo_pipeline_porep.go similarity index 100% rename from curiosrc/web/hapi/simpleinfo_pipeline_porep.go rename to provider/lpweb/hapi/simpleinfo_pipeline_porep.go diff --git a/curiosrc/web/hapi/watch_actor.go b/provider/lpweb/hapi/watch_actor.go similarity index 63% rename from curiosrc/web/hapi/watch_actor.go rename to provider/lpweb/hapi/watch_actor.go index a65608f140a..e785a415b6b 100644 --- a/curiosrc/web/hapi/watch_actor.go +++ b/provider/lpweb/hapi/watch_actor.go @@ -10,9 +10,6 @@ import ( "github.com/filecoin-project/go-address" - "github.com/filecoin-project/lotus/blockstore" - "github.com/filecoin-project/lotus/chain/actors/builtin/miner" - "github.com/filecoin-project/lotus/chain/store" "github.com/filecoin-project/lotus/chain/types" ) @@ -42,8 +39,6 @@ func (a *app) updateActor(ctx context.Context) error { api := a.workingApi a.rpcInfoLk.Unlock() - stor := store.ActorStore(ctx, blockstore.NewReadCachedBlockstore(blockstore.NewAPIBlockstore(a.workingApi), ChainBlockCache)) - if api == nil { log.Warnw("no working api yet") return nil @@ -70,11 +65,6 @@ func (a *app) updateActor(ctx context.Context) error { return err } - wins, err := a.spWins(ctx) - if err != nil { - return xerrors.Errorf("getting sp wins: %w", err) - } - for addr, cnames := range confNameToAddr { p, err := api.StateMinerPower(ctx, addr, types.EmptyTSK) if err != nil { @@ -86,16 +76,6 @@ func (a *app) updateActor(ctx context.Context) error { return xerrors.Errorf("getting deadlines: %w", err) } - mact, err := api.StateGetActor(ctx, addr, types.EmptyTSK) - if err != nil { - return xerrors.Errorf("getting actor: %w", err) - } - - mas, err := miner.Load(stor, mact) - if err != nil { - return err - } - outDls := []actorDeadline{} for dlidx := range dls { @@ -147,35 +127,12 @@ func (a *app) updateActor(ctx context.Context) error { outDls[pd.Index].Current = true - avail, err := mas.AvailableBalance(mact.Balance) - if err != nil { - return xerrors.Errorf("getting available balance: %w", err) - } - - mi, err := mas.Info() - if err != nil { - return xerrors.Errorf("getting miner info: %w", err) - } - - wbal, err := api.WalletBalance(ctx, mi.Worker) - if err != nil { - return xerrors.Errorf("getting worker balance: %w", err) - } - actorInfos = append(actorInfos, actorInfo{ Address: addr.String(), CLayers: cnames, QualityAdjustedPower: types.DeciStr(p.MinerPower.QualityAdjPower), RawBytePower: types.DeciStr(p.MinerPower.RawBytePower), Deadlines: outDls, - - ActorBalance: types.FIL(mact.Balance).Short(), - ActorAvailable: types.FIL(avail).Short(), - WorkerBalance: types.FIL(wbal).Short(), - - Win1: wins[addr].Win1, // note: zero values are fine here - Win7: wins[addr].Win7, - Win30: wins[addr].Win30, }) } @@ -208,57 +165,6 @@ func (a *app) loadConfigs(ctx context.Context) (map[string]string, error) { return configs, nil } -type wins struct { - SpID int64 `db:"sp_id"` - Win1 int64 `db:"win1"` - Win7 int64 `db:"win7"` - Win30 int64 `db:"win30"` -} - -func (a *app) spWins(ctx context.Context) (map[address.Address]wins, error) { - var w []wins - - // note: this query uses mining_tasks_won_sp_id_base_compute_time_index - err := a.db.Select(ctx, &w, `WITH wins AS ( - SELECT - sp_id, - base_compute_time, - won - FROM - mining_tasks - WHERE - won = true - AND base_compute_time > NOW() - INTERVAL '30 days' - ) - - SELECT - sp_id, - COUNT(*) FILTER (WHERE base_compute_time > NOW() - INTERVAL '1 day') AS "win1", - COUNT(*) FILTER (WHERE base_compute_time > NOW() - INTERVAL '7 days') AS "win7", - COUNT(*) FILTER (WHERE base_compute_time > NOW() - INTERVAL '30 days') AS "win30" - FROM - wins - GROUP BY - sp_id - ORDER BY - sp_id`) - if err != nil { - return nil, xerrors.Errorf("query win counts: %w", err) - } - - wm := make(map[address.Address]wins) - for _, wi := range w { - ma, err := address.NewIDAddress(uint64(wi.SpID)) - if err != nil { - return nil, xerrors.Errorf("parsing miner address: %w", err) - } - - wm[ma] = wi - } - - return wm, nil -} - func forEachConfig[T any](a *app, cb func(name string, v T) error) error { confs, err := a.loadConfigs(context.Background()) if err != nil { diff --git a/curiosrc/web/hapi/web/actor_summary.gohtml b/provider/lpweb/hapi/web/actor_summary.gohtml similarity index 65% rename from curiosrc/web/hapi/web/actor_summary.gohtml rename to provider/lpweb/hapi/web/actor_summary.gohtml index bf577d802e0..31992fb23d1 100644 --- a/curiosrc/web/hapi/web/actor_summary.gohtml +++ b/provider/lpweb/hapi/web/actor_summary.gohtml @@ -15,16 +15,6 @@ {{end}} - {{.ActorBalance}} - {{.ActorAvailable}} - {{.WorkerBalance}} - - - - - -
1day:  {{.Win1}}
7day:  {{.Win7}}
30day: {{.Win30}}
- {{end}} {{end}} \ No newline at end of file diff --git a/curiosrc/web/hapi/web/chain_rpcs.gohtml b/provider/lpweb/hapi/web/chain_rpcs.gohtml similarity index 100% rename from curiosrc/web/hapi/web/chain_rpcs.gohtml rename to provider/lpweb/hapi/web/chain_rpcs.gohtml diff --git a/provider/lpweb/hapi/web/cluster_machines.gohtml b/provider/lpweb/hapi/web/cluster_machines.gohtml new file mode 100644 index 00000000000..f94f53bf8b4 --- /dev/null +++ b/provider/lpweb/hapi/web/cluster_machines.gohtml @@ -0,0 +1,10 @@ +{{define "cluster_machines"}} +{{range .}} + + {{.Address}} + {{.ID}} + todo + {{.SinceContact}} + +{{end}} +{{end}} diff --git a/curiosrc/web/hapi/web/cluster_task_history.gohtml b/provider/lpweb/hapi/web/cluster_task_history.gohtml similarity index 100% rename from curiosrc/web/hapi/web/cluster_task_history.gohtml rename to provider/lpweb/hapi/web/cluster_task_history.gohtml diff --git a/curiosrc/web/hapi/web/cluster_tasks.gohtml b/provider/lpweb/hapi/web/cluster_tasks.gohtml similarity index 100% rename from curiosrc/web/hapi/web/cluster_tasks.gohtml rename to provider/lpweb/hapi/web/cluster_tasks.gohtml diff --git a/curiosrc/web/hapi/web/pipeline_porep_sectors.gohtml b/provider/lpweb/hapi/web/pipeline_porep_sectors.gohtml similarity index 100% rename from curiosrc/web/hapi/web/pipeline_porep_sectors.gohtml rename to provider/lpweb/hapi/web/pipeline_porep_sectors.gohtml diff --git a/curiosrc/web/hapi/web/pipline_porep.gohtml b/provider/lpweb/hapi/web/pipline_porep.gohtml similarity index 100% rename from curiosrc/web/hapi/web/pipline_porep.gohtml rename to provider/lpweb/hapi/web/pipline_porep.gohtml diff --git a/curiosrc/web/srv.go b/provider/lpweb/srv.go similarity index 84% rename from curiosrc/web/srv.go rename to provider/lpweb/srv.go index 2bc2cfa29a0..e7640bd1a39 100644 --- a/curiosrc/web/srv.go +++ b/provider/lpweb/srv.go @@ -1,5 +1,5 @@ -// Package web defines the HTTP web server for static files and endpoints. -package web +// Package lpweb defines the HTTP web server for static files and endpoints. +package lpweb import ( "context" @@ -16,10 +16,10 @@ import ( "github.com/gorilla/mux" "go.opencensus.io/tag" - "github.com/filecoin-project/lotus/cmd/curio/deps" - "github.com/filecoin-project/lotus/curiosrc/web/api" - "github.com/filecoin-project/lotus/curiosrc/web/hapi" + "github.com/filecoin-project/lotus/cmd/lotus-provider/deps" "github.com/filecoin-project/lotus/metrics" + "github.com/filecoin-project/lotus/provider/lpweb/api" + "github.com/filecoin-project/lotus/provider/lpweb/hapi" ) //go:embed static @@ -41,8 +41,7 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) { var static fs.FS = static if webDev { - basePath = "cmd/curio/web/static" - static = os.DirFS(basePath) + static = os.DirFS("./provider/lpweb") } mx.NotFoundHandler = http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { @@ -72,7 +71,7 @@ func GetSrv(ctx context.Context, deps *deps.Deps) (*http.Server, error) { return &http.Server{ Handler: http.HandlerFunc(mx.ServeHTTP), BaseContext: func(listener net.Listener) context.Context { - ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "curio")) + ctx, _ := tag.New(context.Background(), tag.Upsert(metrics.APIInterface, "lotus-provider")) return ctx }, Addr: deps.Cfg.Subsystems.GuiAddress, diff --git a/curiosrc/web/static/chain-connectivity.js b/provider/lpweb/static/chain-connectivity.js similarity index 100% rename from curiosrc/web/static/chain-connectivity.js rename to provider/lpweb/static/chain-connectivity.js diff --git a/curiosrc/web/static/index.html b/provider/lpweb/static/index.html similarity index 94% rename from curiosrc/web/static/index.html rename to provider/lpweb/static/index.html index 674b4a88e93..95e2378034a 100644 --- a/curiosrc/web/static/index.html +++ b/provider/lpweb/static/index.html @@ -1,6 +1,6 @@ - Curio Cluster Overview + Lotus Provider Cluster Overview @@ -39,7 +39,7 @@
-

Curio Cluster

+

Lotus Provider Cluster

version [todo] @@ -59,8 +59,8 @@

Cluster Machines

Host ID + Config Layers Last Contact - Tasks (24h) @@ -98,10 +98,6 @@

Actor Summary

Config Layers QaP Deadlines - Balance - Available - Worker - Wins diff --git a/curiosrc/web/static/main.css b/provider/lpweb/static/main.css similarity index 100% rename from curiosrc/web/static/main.css rename to provider/lpweb/static/main.css diff --git a/curiosrc/web/static/pipeline_porep.html b/provider/lpweb/static/pipeline_porep.html similarity index 100% rename from curiosrc/web/static/pipeline_porep.html rename to provider/lpweb/static/pipeline_porep.html diff --git a/curiosrc/window/compute_do.go b/provider/lpwindow/compute_do.go similarity index 99% rename from curiosrc/window/compute_do.go rename to provider/lpwindow/compute_do.go index 2c861ad3df4..7089ceb027e 100644 --- a/curiosrc/window/compute_do.go +++ b/provider/lpwindow/compute_do.go @@ -1,4 +1,4 @@ -package window +package lpwindow import ( "bytes" @@ -24,7 +24,7 @@ import ( "github.com/filecoin-project/lotus/build" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" - "github.com/filecoin-project/lotus/chain/types" + types "github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/storage/sealer" "github.com/filecoin-project/lotus/storage/sealer/storiface" ) diff --git a/curiosrc/window/compute_task.go b/provider/lpwindow/compute_task.go similarity index 98% rename from curiosrc/window/compute_task.go rename to provider/lpwindow/compute_task.go index 541a2d5e2c1..65102d0f014 100644 --- a/curiosrc/window/compute_task.go +++ b/provider/lpwindow/compute_task.go @@ -1,4 +1,4 @@ -package window +package lpwindow import ( "bytes" @@ -22,20 +22,20 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/chainsched" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" "github.com/filecoin-project/lotus/lib/harmony/taskhelp" "github.com/filecoin-project/lotus/lib/promise" "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/lotus/provider/chainsched" "github.com/filecoin-project/lotus/storage/sealer" "github.com/filecoin-project/lotus/storage/sealer/sealtasks" "github.com/filecoin-project/lotus/storage/sealer/storiface" "github.com/filecoin-project/lotus/storage/wdpost" ) -var log = logging.Logger("curio/window") +var log = logging.Logger("lpwindow") var EpochsPerDeadline = miner.WPoStProvingPeriod() / abi.ChainEpoch(miner.WPoStPeriodDeadlines) @@ -86,7 +86,7 @@ func NewWdPostTask(db *harmonydb.DB, faultTracker sealer.FaultTracker, prover ProverPoSt, verifier storiface.Verifier, - pcs *chainsched.CurioChainSched, + pcs *chainsched.ProviderChainSched, actors map[dtypes.MinerAddress]bool, max int, ) (*WdPostTask, error) { diff --git a/curiosrc/window/faults_simple.go b/provider/lpwindow/faults_simple.go similarity index 99% rename from curiosrc/window/faults_simple.go rename to provider/lpwindow/faults_simple.go index 64f5e86506c..b596fb5a754 100644 --- a/curiosrc/window/faults_simple.go +++ b/provider/lpwindow/faults_simple.go @@ -1,4 +1,4 @@ -package window +package lpwindow import ( "context" diff --git a/curiosrc/window/recover_task.go b/provider/lpwindow/recover_task.go similarity index 96% rename from curiosrc/window/recover_task.go rename to provider/lpwindow/recover_task.go index 1ed110978c1..27c501dde17 100644 --- a/curiosrc/window/recover_task.go +++ b/provider/lpwindow/recover_task.go @@ -1,4 +1,4 @@ -package window +package lpwindow import ( "context" @@ -15,20 +15,20 @@ import ( "github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors/builtin/miner" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/chainsched" - "github.com/filecoin-project/lotus/curiosrc/message" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" "github.com/filecoin-project/lotus/lib/promise" "github.com/filecoin-project/lotus/node/modules/dtypes" + "github.com/filecoin-project/lotus/provider/chainsched" + "github.com/filecoin-project/lotus/provider/lpmessage" + "github.com/filecoin-project/lotus/provider/multictladdr" "github.com/filecoin-project/lotus/storage/sealer" "github.com/filecoin-project/lotus/storage/wdpost" ) type WdPostRecoverDeclareTask struct { - sender *message.Sender + sender *lpmessage.Sender db *harmonydb.DB api WdPostRecoverDeclareTaskApi faultTracker sealer.FaultTracker @@ -57,12 +57,12 @@ type WdPostRecoverDeclareTaskApi interface { StateLookupID(context.Context, address.Address, types.TipSetKey) (address.Address, error) } -func NewWdPostRecoverDeclareTask(sender *message.Sender, +func NewWdPostRecoverDeclareTask(sender *lpmessage.Sender, db *harmonydb.DB, api WdPostRecoverDeclareTaskApi, faultTracker sealer.FaultTracker, as *multictladdr.MultiAddressSelector, - pcs *chainsched.CurioChainSched, + pcs *chainsched.ProviderChainSched, maxDeclareRecoveriesGasFee types.FIL, actors map[dtypes.MinerAddress]bool) (*WdPostRecoverDeclareTask, error) { diff --git a/curiosrc/window/submit_task.go b/provider/lpwindow/submit_task.go similarity index 95% rename from curiosrc/window/submit_task.go rename to provider/lpwindow/submit_task.go index 330fd050902..8d39c40abeb 100644 --- a/curiosrc/window/submit_task.go +++ b/provider/lpwindow/submit_task.go @@ -1,4 +1,4 @@ -package window +package lpwindow import ( "bytes" @@ -15,13 +15,13 @@ import ( "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/chain/types" - "github.com/filecoin-project/lotus/curiosrc/chainsched" - "github.com/filecoin-project/lotus/curiosrc/message" - "github.com/filecoin-project/lotus/curiosrc/multictladdr" "github.com/filecoin-project/lotus/lib/harmony/harmonydb" "github.com/filecoin-project/lotus/lib/harmony/harmonytask" "github.com/filecoin-project/lotus/lib/harmony/resources" "github.com/filecoin-project/lotus/lib/promise" + "github.com/filecoin-project/lotus/provider/chainsched" + "github.com/filecoin-project/lotus/provider/lpmessage" + "github.com/filecoin-project/lotus/provider/multictladdr" "github.com/filecoin-project/lotus/storage/wdpost" ) @@ -42,7 +42,7 @@ type WdPoStSubmitTaskApi interface { } type WdPostSubmitTask struct { - sender *message.Sender + sender *lpmessage.Sender db *harmonydb.DB api WdPoStSubmitTaskApi @@ -52,7 +52,7 @@ type WdPostSubmitTask struct { submitPoStTF promise.Promise[harmonytask.AddTaskFunc] } -func NewWdPostSubmitTask(pcs *chainsched.CurioChainSched, send *message.Sender, db *harmonydb.DB, api WdPoStSubmitTaskApi, maxWindowPoStGasFee types.FIL, as *multictladdr.MultiAddressSelector) (*WdPostSubmitTask, error) { +func NewWdPostSubmitTask(pcs *chainsched.ProviderChainSched, send *lpmessage.Sender, db *harmonydb.DB, api WdPoStSubmitTaskApi, maxWindowPoStGasFee types.FIL, as *multictladdr.MultiAddressSelector) (*WdPostSubmitTask, error) { res := &WdPostSubmitTask{ sender: send, db: db, diff --git a/curiosrc/winning/winning_task.go b/provider/lpwinning/winning_task.go similarity index 99% rename from curiosrc/winning/winning_task.go rename to provider/lpwinning/winning_task.go index 064696727e1..7f3c97616ff 100644 --- a/curiosrc/winning/winning_task.go +++ b/provider/lpwinning/winning_task.go @@ -1,4 +1,4 @@ -package winning +package lpwinning import ( "bytes" @@ -32,7 +32,7 @@ import ( "github.com/filecoin-project/lotus/storage/sealer/storiface" ) -var log = logging.Logger("curio/winning") +var log = logging.Logger("lpwinning") type WinPostTask struct { max int diff --git a/curiosrc/multictladdr/multiaddresses.go b/provider/multictladdr/multiaddresses.go similarity index 97% rename from curiosrc/multictladdr/multiaddresses.go rename to provider/multictladdr/multiaddresses.go index af751ff17e7..4f19477294c 100644 --- a/curiosrc/multictladdr/multiaddresses.go +++ b/provider/multictladdr/multiaddresses.go @@ -14,7 +14,7 @@ import ( "github.com/filecoin-project/lotus/storage/ctladdr" ) -var log = logging.Logger("curio/multictladdr") +var log = logging.Logger("multictladdr") type MultiAddressSelector struct { MinerMap map[address.Address]api.AddressConfig diff --git a/scripts/fiximports b/scripts/fiximports new file mode 100755 index 00000000000..140cebbce72 --- /dev/null +++ b/scripts/fiximports @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +sed_replace='/import (/ { + :1 + $!N + s/\n\n/\'$'\n''/ + /)/!b1 +}' + +go_files() { + find . -type f -name \*.go -not -name \*_cbor_gen.go | grep -v './extern/filecoin-ffi' | grep -v './extern/test-vectors' +} + +# Because -i works differently on macOS, we need to use a different sed command +if [[ "$OSTYPE" == "darwin"* ]]; then + go_files | xargs -I '{}' sed -i '' -e "$sed_replace" '{}' +else + go_files | xargs -I '{}' sed -i -e "$sed_replace" '{}' +fi + +go_files | xargs -I '{}' goimports -w -local "github.com/filecoin-project" '{}' +go_files | xargs -I '{}' goimports -w -local "github.com/filecoin-project/lotus" '{}' diff --git a/scripts/fiximports/main.go b/scripts/fiximports/main.go deleted file mode 100644 index 427975855bc..00000000000 --- a/scripts/fiximports/main.go +++ /dev/null @@ -1,92 +0,0 @@ -package main - -import ( - "bytes" - "fmt" - "io" - "io/fs" - "os" - "path/filepath" - "regexp" - "strings" - - "golang.org/x/tools/imports" -) - -var ( - // groupByPrefixes is the list of import prefixes that should _each_ be grouped separately. - // See: imports.LocalPrefix. - groupByPrefixes = []string{ - "github.com/filecoin-project", - "github.com/filecoin-project/lotus", - } - newline = []byte("\n") - importBlockRegex = regexp.MustCompile(`(?s)import\s*\((.*?)\)`) - consecutiveNewlinesRegex = regexp.MustCompile(`\n\s*\n`) -) - -func main() { - if err := filepath.Walk(".", func(path string, info fs.FileInfo, err error) error { - switch { - case err != nil: - return err - case // Skip the entire "./extern/..." directory and its contents. - strings.HasPrefix(path, "extern/"): - return filepath.SkipDir - case // Skip directories, generated cborgen go files and any other non-go files. - info.IsDir(), - strings.HasSuffix(info.Name(), "_cbor_gen.go"), - !strings.HasSuffix(info.Name(), ".go"): - return nil - } - return fixGoImports(path) - }); err != nil { - fmt.Printf("Error fixing go imports: %v\n", err) - os.Exit(1) - } -} - -func fixGoImports(path string) error { - sourceFile, err := os.OpenFile(path, os.O_RDWR, 0666) - if err != nil { - return err - } - defer func() { _ = sourceFile.Close() }() - - source, err := io.ReadAll(sourceFile) - if err != nil { - return err - } - formatted := collapseImportNewlines(source) - for _, prefix := range groupByPrefixes { - imports.LocalPrefix = prefix - formatted, err = imports.Process(path, formatted, nil) - if err != nil { - return err - } - } - if !bytes.Equal(source, formatted) { - if err := replaceFileContent(sourceFile, formatted); err != nil { - return err - } - } - return nil -} - -func replaceFileContent(target *os.File, replacement []byte) error { - if _, err := target.Seek(0, io.SeekStart); err != nil { - return err - } - written, err := target.Write(replacement) - if err != nil { - return err - } - return target.Truncate(int64(written)) -} - -func collapseImportNewlines(content []byte) []byte { - return importBlockRegex.ReplaceAllFunc(content, func(importBlock []byte) []byte { - // Replace consecutive newlines with a single newline within the import block - return consecutiveNewlinesRegex.ReplaceAll(importBlock, newline) - }) -} diff --git a/scripts/generate-lotus-cli.py b/scripts/generate-lotus-cli.py index 305716b0905..1e1fee9a61c 100644 --- a/scripts/generate-lotus-cli.py +++ b/scripts/generate-lotus-cli.py @@ -55,4 +55,4 @@ def get_cmd_recursively(cur_cmd): generate_lotus_cli('lotus') generate_lotus_cli('lotus-miner') generate_lotus_cli('lotus-worker') - generate_lotus_cli('curio') \ No newline at end of file + generate_lotus_cli('lotus-provider') \ No newline at end of file diff --git a/scripts/curio.service b/scripts/lotus-provider.service similarity index 55% rename from scripts/curio.service rename to scripts/lotus-provider.service index 967a788fa81..ddec181ba09 100644 --- a/scripts/curio.service +++ b/scripts/lotus-provider.service @@ -1,11 +1,11 @@ [Unit] -Description=Curio +Description=Lotus Provider After=network.target After=lotus-daemon.service [Service] -ExecStart=/usr/local/bin/curio run -Environment=GOLOG_FILE="/var/log/curio/curio.log" +ExecStart=/usr/local/bin/lotus-provider run +Environment=GOLOG_FILE="/var/log/lotus/provider.log" Environment=GOLOG_LOG_FMT="json" LimitNOFILE=1000000 [Install] diff --git a/storage/paths/http_handler.go b/storage/paths/http_handler.go index c828f600609..57de578a646 100644 --- a/storage/paths/http_handler.go +++ b/storage/paths/http_handler.go @@ -12,6 +12,7 @@ import ( "github.com/gorilla/mux" "github.com/ipfs/go-cid" logging "github.com/ipfs/go-log/v2" + "golang.org/x/xerrors" "github.com/filecoin-project/go-state-types/abi" @@ -339,5 +340,18 @@ func (handler *FetchHandler) generatePoRepVanillaProof(w http.ResponseWriter, r } func FileTypeFromString(t string) (storiface.SectorFileType, error) { - return storiface.TypeFromString(t) + switch t { + case storiface.FTUnsealed.String(): + return storiface.FTUnsealed, nil + case storiface.FTSealed.String(): + return storiface.FTSealed, nil + case storiface.FTCache.String(): + return storiface.FTCache, nil + case storiface.FTUpdate.String(): + return storiface.FTUpdate, nil + case storiface.FTUpdateCache.String(): + return storiface.FTUpdateCache, nil + default: + return 0, xerrors.Errorf("unknown sector file type: '%s'", t) + } } diff --git a/storage/paths/remote.go b/storage/paths/remote.go index 9ff719954bb..882c98c4a0d 100644 --- a/storage/paths/remote.go +++ b/storage/paths/remote.go @@ -747,48 +747,6 @@ func (r *Remote) Reader(ctx context.Context, s storiface.SectorRef, offset, size return nil, nil } -// ReaderSeq creates a simple sequential reader for a file. Does not work for -// file types which are a directory (e.g. FTCache). -func (r *Remote) ReaderSeq(ctx context.Context, s storiface.SectorRef, ft storiface.SectorFileType) (io.ReadCloser, error) { - paths, _, err := r.local.AcquireSector(ctx, s, ft, storiface.FTNone, storiface.PathStorage, storiface.AcquireMove) - if err != nil { - return nil, xerrors.Errorf("acquire local: %w", err) - } - - path := storiface.PathByType(paths, ft) - if path != "" { - return os.Open(path) - } - - si, err := r.index.StorageFindSector(ctx, s.ID, ft, 0, false) - if err != nil { - log.Debugf("Reader, did not find file on any of the workers %s (%s)", path, ft.String()) - return nil, err - } - - if len(si) == 0 { - return nil, xerrors.Errorf("failed to read sector %v from remote(%d): %w", s, ft, storiface.ErrSectorNotFound) - } - - sort.Slice(si, func(i, j int) bool { - return si[i].Weight > si[j].Weight - }) - - for _, info := range si { - for _, url := range info.URLs { - rd, err := r.readRemote(ctx, url, 0, 0) - if err != nil { - log.Warnw("reading from remote", "url", url, "error", err) - continue - } - - return rd, err - } - } - - return nil, xerrors.Errorf("failed to read sector %v from remote(%d): %w", s, ft, storiface.ErrSectorNotFound) -} - func (r *Remote) Reserve(ctx context.Context, sid storiface.SectorRef, ft storiface.SectorFileType, storageIDs storiface.SectorPaths, overheadTab map[storiface.SectorFileType]int) (func(), error) { log.Warnf("reserve called on remote store, sectorID: %v", sid.ID) return func() { diff --git a/storage/pipeline/commit_batch.go b/storage/pipeline/commit_batch.go index ecb8569d0e1..d702d307884 100644 --- a/storage/pipeline/commit_batch.go +++ b/storage/pipeline/commit_batch.go @@ -841,7 +841,7 @@ func (b *CommitBatcher) getCommitCutoff(si SectorInfo) (time.Time, error) { } av, err := actorstypes.VersionForNetwork(nv) if err != nil { - log.Errorf("unsupported network version: %s", err) + log.Errorf("unsupported network vrsion: %s", err) return time.Now(), err } mpcd, err := policy.GetMaxProveCommitDuration(av, si.SectorType) diff --git a/storage/sealer/ffiwrapper/basicfs/fs.go b/storage/sealer/ffiwrapper/basicfs/fs.go index 47c7f526e32..4fd8e271fdf 100644 --- a/storage/sealer/ffiwrapper/basicfs/fs.go +++ b/storage/sealer/ffiwrapper/basicfs/fs.go @@ -39,9 +39,6 @@ func (b *Provider) AcquireSector(ctx context.Context, id storiface.SectorRef, ex if err := os.Mkdir(filepath.Join(b.Root, storiface.FTUpdateCache.String()), 0755); err != nil && !os.IsExist(err) { // nolint return storiface.SectorPaths{}, nil, err } - if err := os.Mkdir(filepath.Join(b.Root, storiface.FTPiece.String()), 0755); err != nil && !os.IsExist(err) { // nolint - return storiface.SectorPaths{}, nil, err - } done := func() {} diff --git a/storage/sealer/partialfile/partialfile.go b/storage/sealer/partialfile/partialfile.go index f811f3349ed..bb3cfb59019 100644 --- a/storage/sealer/partialfile/partialfile.go +++ b/storage/sealer/partialfile/partialfile.go @@ -64,7 +64,7 @@ func writeTrailer(maxPieceSize int64, w *os.File, r rlepluslazy.RunIterator) err func CreatePartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*PartialFile, error) { f, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0644) // nolint if err != nil { - return nil, xerrors.Errorf("opening partial file '%s': %w", path, err) + return nil, xerrors.Errorf("openning partial file '%s': %w", path, err) } err = func() error { @@ -99,7 +99,7 @@ func CreatePartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*PartialF func OpenPartialFile(maxPieceSize abi.PaddedPieceSize, path string) (*PartialFile, error) { f, err := os.OpenFile(path, os.O_RDWR, 0644) // nolint if err != nil { - return nil, xerrors.Errorf("opening partial file '%s': %w", path, err) + return nil, xerrors.Errorf("openning partial file '%s': %w", path, err) } st, err := f.Stat() diff --git a/storage/sealer/sched_worker.go b/storage/sealer/sched_worker.go index b482be589c5..35acd755d0e 100644 --- a/storage/sealer/sched_worker.go +++ b/storage/sealer/sched_worker.go @@ -137,7 +137,7 @@ func (sw *schedWorker) handleWorker() { } // wait for more tasks to be assigned by the main scheduler or for the worker - // to finish processing a task + // to finish precessing a task update, pokeSched, ok := sw.waitForUpdates() if !ok { return diff --git a/storage/sealer/storiface/filetype.go b/storage/sealer/storiface/filetype.go index 887dda68840..ec3c5450cb3 100644 --- a/storage/sealer/storiface/filetype.go +++ b/storage/sealer/storiface/filetype.go @@ -9,22 +9,16 @@ import ( ) const ( - // "regular" sectors FTUnsealed SectorFileType = 1 << iota FTSealed FTCache - - // snap FTUpdate FTUpdateCache - // Piece Park - FTPiece - FileTypes = iota ) -var PathTypes = []SectorFileType{FTUnsealed, FTSealed, FTCache, FTUpdate, FTUpdateCache, FTPiece} +var PathTypes = []SectorFileType{FTUnsealed, FTSealed, FTCache, FTUpdate, FTUpdateCache} const ( FTNone SectorFileType = 0 @@ -45,7 +39,6 @@ var FSOverheadSeal = map[SectorFileType]int{ // 10x overheads FTUpdate: FSOverheadDen, FTUpdateCache: FSOverheadDen*2 + 1, FTCache: 141, // 11 layers + D(2x ssize) + C + R' - FTPiece: FSOverheadDen, } // sector size * disk / fs overhead. FSOverheadDen is like the unit of sector size @@ -56,7 +49,6 @@ var FsOverheadFinalized = map[SectorFileType]int{ FTUpdate: FSOverheadDen, FTUpdateCache: 1, FTCache: 1, - FTPiece: FSOverheadDen, } type SectorFileType int @@ -73,8 +65,6 @@ func TypeFromString(s string) (SectorFileType, error) { return FTUpdate, nil case "update-cache": return FTUpdateCache, nil - case "piece": - return FTPiece, nil default: return 0, xerrors.Errorf("unknown sector file type '%s'", s) } @@ -92,8 +82,6 @@ func (t SectorFileType) String() string { return "update" case FTUpdateCache: return "update-cache" - case FTPiece: - return "piece" default: return fmt.Sprintf("", t, (t & ((1 << FileTypes) - 1)).Strings()) } @@ -218,7 +206,6 @@ type SectorPaths struct { Cache string Update string UpdateCache string - Piece string } func ParseSectorID(baseName string) (abi.SectorID, error) { @@ -255,8 +242,6 @@ func PathByType(sps SectorPaths, fileType SectorFileType) string { return sps.Update case FTUpdateCache: return sps.UpdateCache - case FTPiece: - return sps.Piece } panic("requested unknown path type") @@ -274,7 +259,5 @@ func SetPathByType(sps *SectorPaths, fileType SectorFileType, p string) { sps.Update = p case FTUpdateCache: sps.UpdateCache = p - case FTPiece: - sps.Piece = p } } diff --git a/storage/sealer/storiface/storage.go b/storage/sealer/storiface/storage.go index 75cc9399cd3..fe4e1e2086a 100644 --- a/storage/sealer/storiface/storage.go +++ b/storage/sealer/storiface/storage.go @@ -20,17 +20,6 @@ type SectorRef struct { var NoSectorRef = SectorRef{} -// PieceNumber is a reference to a piece in the storage system; mapping between -// pieces in the storage system and piece CIDs is maintained by the storage index -type PieceNumber uint64 - -func (pn PieceNumber) Ref() SectorRef { - return SectorRef{ - ID: abi.SectorID{Miner: 0, Number: abi.SectorNumber(pn)}, - ProofType: abi.RegisteredSealProof_StackedDrg64GiBV1, // This only cares about TreeD which is the same for all sizes - } -} - type ProverPoSt interface { GenerateWinningPoSt(ctx context.Context, minerID abi.ActorID, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) ([]proof.PoStProof, error) GenerateWindowPoSt(ctx context.Context, minerID abi.ActorID, ppt abi.RegisteredPoStProof, sectorInfo []proof.ExtendedSectorInfo, randomness abi.PoStRandomness) (proof []proof.PoStProof, skipped []abi.SectorID, err error)