rosetta-filecoin-proxy

command module
v1.3901.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 1, 2026 License: Apache-2.0 Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Rosetta integration for Filecoin (Proxy)

License CircleCI Github-Actions

To build the proxy run:

make

If you have upgraded and you find FFI issues, try:

make gitclean
make

If you want to install the linter we use try:

make install_lint
make lint

Forwarding request headers to Lotus

Set FORWARD_HEADERS to a comma-separated allowlist of header names to copy from each incoming Rosetta request onto every Lotus RPC call made while serving it (e.g. for caller attribution and metrics):

FORWARD_HEADERS=x-client-id,x-request-id LOTUS_RPC_URL=https://<node>/rpc ./rosetta-filecoin-proxy
  • Empty or unset (default): nothing is forwarded and behaviour is unchanged.
  • Values are attached per request; they are never set on the shared Lotus client.
  • Requires an http(s):// LOTUS_RPC_URL. Websocket connections send headers only when the connection is opened, so startup fails if FORWARD_HEADERS is set with a ws(s):// URL.
  • Authorization, Cookie, Host, Content-*, hop-by-hop, Sec-WebSocket-* and (X-)Idempotency-Key (it makes Go's HTTP client auto-replay POSTs) headers can never be forwarded; startup fails if one is listed.
  • Allowlisted headers named in the incoming request's Connection header are dropped.
  • Values longer than FORWARD_HEADERS_MAX_VALUE_BYTES (default 1024) are dropped and a warning naming the header (never its value) is logged. Startup fails if it is not a positive integer.
  • Forwarded values are whatever the caller sent. Don't rely on them for access control or billing unless something in front of Rosetta sets or strips them.
  • Actor lookups served from the in-memory cache make no Lotus call, so they carry no headers.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
rosetta
examples command
tests

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址