1537 Commits

Author SHA1 Message Date
c3b48f5e0a chore: return method not supported via Gateway when /v2 is absent (#13121)
When there is no /v2 api offered by the full-node gracefully fallback to returning `method not supported` via Gateway.
2025-05-11 15:02:58 +00:00
4bf5e0c51d chore: fix typo in subscription naming (#13086)
Fix typo in subscription naming

Fix a few typos in code and remove redundant type declarations.
2025-04-30 16:28:03 +00:00
d9a93185e5 feat: expose /v2 APIs through Lotus Gateway (#13075)
Integrate the existing v2 APIs into Lotus Gateway such that they are
accessible via `/rpc/v2` endpoint similar to full node APIs except
through the gateway reverse proxy along with rate limiting and handling
of stateful connections over web socket.

The prior gateway implementation did not have a concept of per-uri
reverse proxy handling. The changes here separate reverse proxy
implementation in gateway from the gateway node to introduce separate
handling of v1 and v2 APIs. The work introduces a top-level
`v2api.Gateway` interface to capture the APIs exposed by the v2 gateway
and generate any relevant documentation based on the interface.

Specifically, the work here separates the handling of stateful
connections between v1 and v2 to avoid any cross-contamination between
Eth calls to either API. However, the total rate limiting has stayed
shared across both URIs.

The underused mock interface in v1 is now removed in favor of the
generated gomock interfaces to reduce the LOC in `gateway` package. The
interface was barely used by the tests and would have resulted in
unnecessary LOC to implement v2.

I have held back on unrelated refactoring of `gateway` package. The code
can use further restructuring, but for now the focus is to expose
existing /v2 APIs over the gateway.

The implementation of `Version` in /v2 APIs is also left as a TODO since
it requires implementation at the top level API and bubbles up into
`Common` APIs.
2025-04-29 10:02:48 +01:00
a1f1d51b73 feat: implement ChainGetTipSet in Lotus v2 APIs (#13003)
Introduce the first API for Lotus v2, focusing on `ChainGetTipSet`
within the `Chain` group. Define `TipSetSelector` for advanced
tipset retrieval options, and create a compact JSON-RPC call format.

Gracefully accommodate both EC and F3 finalized tipsets based on node
configuration, where:
* EC finalized tipset is returned when F3 is turned off, has no
  finalized tipset or F3 isn't ready.
* F3 finalized is returned otherwise.

Support three categories of selectors under `TipSetSelector`:
* By tag: either "latest" or "finalized."
* By height: epoch, plus optional fallback to previous non-null tipset.
* By tipset key.

The selection falls back to tag "latest" if the user specifies no
selection criterion.

The JSON-RPC format is designed to use JSON Object as the parameters
passed to the RPC call to remain compact, and extensible.
2025-04-09 17:08:59 +01:00
9c897c58a0 docs(cli): add usage description for f3 powertable command (#13020)
cli(docs): add usage description for f3 powertable command

cli(docs): add usage description for f3 powertable command
2025-04-09 11:15:58 +02:00
945451c528 feat(miner): remove batch balancer-related functionality (#12919)
Closes: https://github.com/filecoin-project/lotus/issues/12902
2025-03-19 16:07:32 +11:00
36b2478fdb feat(fip0100): updates to FIP including Teep->Tock 2025-03-19 13:43:52 +11:00
2d4da76fea feat(miner): adjust SectorOnChainInfo for FIP-0098 (new nullables) 2025-03-19 13:43:52 +11:00
632e20a626 feat!: fip-0100 dev builds of builtin-actors & go-state-types
Changes some APIs exposed in the miner actor wrapper.
2025-03-19 13:43:52 +11:00
79206a00eb chore: upgrade to go-f3 v0.8.3 (#12941)
Upgrade to go-f3 `v0.8.3`

Upgrade to the latest go-f3, to bubble up:
* various bug fixes
* extended manifest parameters for better control in passive testing

Note that the return type from F3GetProgress API has changed to now
include the input chain to an instance.

Update CLI templates to print the additional fields.
2025-03-17 17:34:33 +00:00
b8718a8b00 fix: prevent panic in FullNodeProxy with empty node list (#12948)
fix: prevent panic in FullNodeProxy with empty node list

fix: prevent panic in FullNodeProxy with empty node list
2025-03-13 14:38:05 +01:00
5582b1ae28 fix(docs): correct typos across whole doc (#12909)
* fix:typos

* fix: suggested change
2025-02-19 14:47:23 +01:00
97dc1865cf feat: add --csv option to the lotus send cmd (#12892) 2025-02-14 07:48:26 +01:00
5f0f5853bf chore: upgrade to the latest go-f3 and allow F3 chain exchange topics (#12893)
Upgrade to the latest go-f3 and allow F3 chain exchange topics

Upgrade to the latest `go-f3` and add the F3 chain exchange topics to
the allowed topic list for both static and dynamic manifests.

Fixes https://github.com/filecoin-project/go-f3/issues/809
2025-02-12 14:43:23 +00:00
48d0ab25a4 feat: automatically detect if genesis CAR is compressed (#12885)
Automatically detect if genesis CAR is compressed

When `--genesis` path is set, automatically detect if the genesis file
is ZSTD compressed and decompress it.
2025-02-11 10:20:29 +00:00
7e956b5d87 fix(wallet): allow delegated wallet import (#12876)
allow delegated wallet import
2025-02-08 09:51:23 +01:00
bb7097785d chore: log failure to run CLI command (#12863)
Log failure to run CLI command

Prior code only conditionally logged the output when `LOTUS_DEV` env
var was present. This doesn't make sense for a number of reasons:

* In case of an error starting up `lotus daemon` via systemctl for
  example the logs would miss the error. One then has to search through
  system journal to see what happened.

* There are no other places that I can find where `LOTUS_DEV` env var is
  used. The commit that introduced this condition is very old with no
  clear commit message to shed light into the rationale.

For the first reason alone, the changes here remove that condition, and
log the message when the logging output is not standard err or out. This
way we at least cover the case where lotus is run in a production
environment and would avoid partial logging of errors.
2025-02-04 16:42:57 +00:00
aa529a91a1 chore: switch to pure-go zstd decoder for snapshot imports (#12857)
* Switch to pure-go zstd decoder for snapshot imports

The benchmarking performed as part of #12852 shows that the pure-go
implementation of zstd decoder is fast-enough for snapshot import.

Switch to it motivated by the desire to reduce CGO dependencies across
Lotus.

Fixes #12852

* Update the pain-log.
2025-01-30 09:00:59 +00:00
4c9687acc2 fix(docs): minor godoc corrections (#12843)
Signed-off-by: petercover <raowanxiang@outlook.com>
2025-01-23 01:05:25 +00:00
364cc7675a feat: handle non-existing actors gracefully in F3 power proportion CLI (#12840)
Handle non-existing actors gracefully in F3 power proportion CLI

When calculating proportional F3 participation power for a given actor
IDs instead of failing when an actor isn't found, collect the
non-existing ones and report them. This makes up a better UX when
debugging F3 in cases where actors don't exist in the F3 power table.
2025-01-22 11:46:17 +01:00
313cd2b11f feat(cli): lotus state sectors --show-partitions + CSV (#12834)
* Add option to show partitions and deadlines.
* Print output in CSV
2025-01-22 12:31:03 +11:00
ed3d40bce1 chore(docs): fix minor typos (#12816) 2025-01-08 15:19:42 +11:00
ed4ea55cc6 feat: generate CLI docs without needing compiled binaries 2025-01-08 09:57:27 +11:00
bbd53a6af7 chore: use time.Since instead of time.Now().Sub (#12801) 2024-12-30 14:13:53 +11:00
6cd8b70313 fix: bad error message capitalisation (#12784) 2024-12-13 21:38:40 +11:00
d463f4cdde docs: fix lowercase initials and typos (#12773)
Signed-off-by: ChengenH <hce19970702@gmail.com>
2024-12-12 16:09:52 +11:00
6347eff776 feat(cli): enhance ChainListCmd with JSON output and <epoch> placeholder support (#12691)
* docs: Update format flag usage with valid placeholders for ChainListCmd

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* feat: Add <json_tipset> placeholder for JSON encoding of the tipset

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* style: Fix formatting in chain.go for consistency and readability

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* fix: Change JSON encoding to single line without indentation

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* docs: Update Usage for format flag to remove placeholder explanations

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* feat: Rename 'height' flag to 'epoch' in ChainListCmd and update usage

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* add changelog

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* docs: Update CLI options in lotus documentation for clarity and detail

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

* fix changelog

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>

---------

Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
2024-12-06 16:03:46 +01:00
a704e4710d chore: delete STM annotations (#12752)
Signed-off-by: Jakub Sztandera <oss@kubuxu.com>
2024-12-05 16:45:07 +11:00
e994e9566c fix: use numerical formatting when printing F3 CLI error message (#12739)
Use numerical format to print actor IDs not found. Otherwise, `%q` will
print special character.
2024-11-29 15:47:50 +11:00
64736eaab0 feat: api: market pending proposal API/CLI (#12724) 2024-11-29 15:28:24 +11:00
c9cbef343b Skip checking the initial power table CID if undefined (#12725)
In Lotus F3 cli Only check the expected power table CID when it is
present.
2024-11-26 10:49:43 +00:00
2cd6f404e9 feat: implement F3 CLI to list power table and proportional power at instance (#12698)
* Implement F3 CLI to list power table and proportional power at instance

Implement utility CLIs to:
* get the power table used by F3 at a given instance ID.
* get total proportional power of a list of actors at a given instance
  ID.

These utilities allow us to debug the exact participation power for an
instance without having to manually calculate it or estimate it from
the latest power.

* Update changelog

* Address lint issue

* Regenerate CLI docs

* Take instance ID via flag and actor IDs as args

* Reduce indentation by defiling top level vars

* Work around bug in docsgencli by using one-liner usage
2024-11-19 10:54:17 +00:00
4eb45ca011 docs: update references for lotus-shed chainindex to lotus index (#12684)
* update docs

* update docs

* chore: run `make docsgen-cli`

chore: run `make docsgen-cli`

---------

Co-authored-by: Phi <orjan.roren@gmail.com>
2024-11-07 16:17:58 +07:00
f0f5c7663b feat(cli): move chainindex cmd from lotus-shed to lotus (#12668) 2024-11-07 16:28:56 +11:00
773efaeaaa Conditionally change the limit of F3 certs listed via CLI (#12669)
* When no range is given, default limit to 10
* Otherwise default to unlimited.

This is better than the current default of always unlimited because:
* there are a lot of certs, and
* when range is given the chances are the user wants all of them.

Addresses https://github.com/filecoin-project/lotus/pull/12627#discussion_r1815426539
2024-11-01 11:25:15 +00:00
265710874b fix(api): make stick sessions actually work and make them non-racy (#12665)
* fix(api): make stick sessions actually work and make them non-racy

We apparently have a way to specify that all "related" requests should
go to the same node. However:

1. It didn't work at all. All future requests would go to the first successful
node from the first request. Because that's how stack variables work.
2. It was racy if the context was re-used concurrently. But only the
first time, see point 1.

* test(api): test the API merge proxy

1. Test whether or not it works.
2. Test stickiness.

* fix(api): update OnSingleNode documentation
2024-11-01 04:07:57 +00:00
c402b5b025 fix(cli): print RebroadcastBackoffExponent in lotus f3 manifest (#12647) 2024-10-28 19:23:49 +01:00
703333c8b4 feat: implement Lotus F3 CLI finality cert get and list (#12627)
Implement `lotus f3` CLI sub commands to:

* Get a specific finality certificate, either latest or by instance ID.
* List a range of finality certificates

Part of #12607
2024-10-24 18:40:08 +00:00
df35dc1bc5 fix(f3): correctly construct the manifest template (#12628) 2024-10-22 21:24:28 +00:00
bc8c29bf7f feat(f3): display the initial power table CID in the F3 manifest (#12626)
Also, add it to the manifest if not already set.
2024-10-22 18:00:01 +00:00
38e4d91409 Implement Lotus F3 CLI commands for general diagnostics (#12617)
Implement `lotus f3` CLI sub commands:

* `manifest` to dump the current F3 manifest in either JSON or text.
* `list-miners` to list the current F3 participants.
* `status` to print summary status of F3.

Part of #12607
2024-10-21 16:13:41 +01:00
d516f3aaa8 feat(cli): lotus chain head --height to print epoch number
A simpler version of what's currently possible with:

	lotus chain list --format '<height>' --count 1
2024-10-17 16:02:46 +11:00
50f72ed0e3 chore(spcli): improve sectors extend sector skipping info logging 2024-10-17 09:07:15 +11:00
a83d02efba chore: deps: bump xerrors / fix lint (#12438) 2024-09-07 21:43:15 +00:00
10f6976a55 chore: docs: fix some misspellings (#12333)
Signed-off-by: riskrose <riskrock@qq.com>
2024-08-02 03:18:16 +00:00
c353a9fb90 only change method for 0x recipients (#12328) 2024-07-31 13:09:36 +04:00
f13dace466 feat: expose settle deal command for lotus miner (#12270)
* feat: add settle deal command for lotus miner [WIP]

* feat: allow settlement of all deals for the miner and fix ci jobs

* fix: address comments

* fix: address comment
2024-07-31 10:39:57 +02:00
e75c5ff624 fix test 2024-07-30 15:37:01 +04:00
724099cf49 Apply suggestions from code review
Co-authored-by: Rod Vagg <rod@vagg.org>
2024-07-30 15:37:01 +04:00
c99a66e575 works for sender and recipient 2024-07-30 15:37:01 +04:00