This is the stable release for the upcoming MANDATORY Filecoin network upgrade v22, codenamed Dragon 🐉, at epoch 3817920 - 2024-04-11 - 14:00:00Z
The switch to the new Drand-network will happen exactly 120 epochs (1 hour) after the Dragon-upgrade. This switch has been codenamed Phoenix.
The Filecoin network version 22 delivers the following FIPs:
- FIP-0063: Switching to new Drand mainnet network
- FIP-0074: Remove cron-based automatic deal settlement
- FIP-0076: Direct data onboarding
- FIP-0083: Add built-in Actor events in the Verified Registry, Miner and Market Actors
☢️ Upgrade Warnings ☢️
- This release requires a minimum Go version of v1.21.7 or higher to successfully build Lotus.
v13 Builtin Actor Bundle
Builtin actor v13.0.0 is used for supporting this upgrade. Make sure that your lotus actor bundle matches the v13 actors manifest by running the following cli after upgrading:
lotus state actor-cids --network-version=22
Network Version: 22
Actor Version: 13
Manifest CID: bafy2bzacecdhvfmtirtojwhw2tyciu4jkbpsbk5g53oe24br27oy62sn4dc4e
Actor CID
account bafk2bzacedxnbtlsqdk76fsfmnhyvsblwyfducerwwtp3mqtx2wbrvs5idl52
cron bafk2bzacebbopddyn5csb3fsuhh2an4ttd23x6qnwixgohlirj5ahtcudphyc
datacap bafk2bzaceah42tfnhd7xnztawgf46gbvc3m2gudoxshlba2ucmmo2vy67t7ci
eam bafk2bzaceb23bhvvcjsth7cn7vp3gbaphrutsaz7v6hkls3ogotzs4bnhm4mk
ethaccount bafk2bzaceautge6zhuy6jbj3uldwoxwhpywuon6z3xfvmdbzpbdribc6zzmei
evm bafk2bzacedq6v2lyuhgywhlllwmudfj2zufzcauxcsvvd34m2ek5xr55mvh2q
init bafk2bzacedr4xacm3fts4vilyeiacjr2hpmwzclyzulbdo24lrfxbtau2wbai
multisig bafk2bzacecr5zqarfqak42xqcfeulsxlavcltawsx2fvc7zsjtby6ti4b3wqc
paymentchannel bafk2bzacebntdhfmyc24e7tm52ggx5tnw4i3hrr3jmllsepv3mibez4hywsa2
placeholder bafk2bzacedfvut2myeleyq67fljcrw4kkmn5pb5dpyozovj7jpoez5irnc3ro
reward bafk2bzacedq4q2kwkruu4xm7rkyygumlbw2yt4nimna2ivea4qarvtkohnuwu
storagemarket bafk2bzacebjtoltdviyznpj34hh5qp6u257jnnbjole5rhqfixm7ug3epvrfu
storageminer bafk2bzacebf4rrqyk7gcfggggul6nfpzay7f2ordnkwm7z2wcf4mq6r7i77t2
storagepower bafk2bzacecjy4dkulvxppg3ocbmeixe2wgg6yxoyjxrm4ko2fm3uhpvfvam6e
system bafk2bzacecyf523quuq2kdjfdvyty446z2ounmamtgtgeqnr3ynlu5cqrlt6e
verifiedregistry bafk2bzacedkxehp7y7iyukbcje3wbpqcvufisos6exatkanyrbotoecdkrbta
Migration
We are expecting a bit heavier than normal state migration for this upgrade due to the amount of state changes introduced with Direct Data Onboarding.
All node operators, including storage providers, should be aware that ONE pre-migration is being scheduled 120 epochs before the upgrade. It will take around 10-20 minutes for the pre-migration and less than 30 seconds for the final migration, depending on the amount of historical state in the node blockstore and the hardware specs the node is running on. During this time, expect slower block validation times, increased CPU and memory usage, and longer delays for API queries
We recommend node operators (who haven't enabled splitstore discard mode) that do not care about historical chain states, to prune the chain blockstore by syncing from a snapshot 1-2 days before the upgrade.
You can test out the migration by running running the benchmarking a network migration
tutorial.
For certain node operators, such as full archival nodes or systems that need to keep large amounts of state (RPC providers), completing the pre-migration in time before the network upgrade might not be achievable. For those node operators, it is recommended to skip the pre-migration and run the non-cached migration (i.e., just running the migration at the exact upgrade epoch), and schedule for some downtime during the upgrade epoch. Operators of such nodes can read the How to disable premigration in network upgrade
tutorial.
New features
- feat: api: new verified registry methods to get all allocations and claims (#11631) (filecoin-project/lotus#11631)
- feat: sealing: Support nv22 DDO features in the sealing pipeline (#11226) (filecoin-project/lotus#11226)
- feat: implement FIP-0063 (filecoin-project/lotus#11572)
- feat: events: Add Lotus APIs to consume smart contract and built-in actor events (filecoin-project/lotus#11618)
Tracing API
Replace the CodeCid
field in the message trace (added in 1.23.4) with an InvokedActor
field.
Before:
{
"Msg": {
"From": ...,
"To": ...,
...
"CodeCid": ... // The actor's code CID.
}
"MsgRct": ...,
"GasCharges": [],
"Subcalls": [],
}
After:
{
"Msg": {
"From": ...,
"To": ...
}
"InvokedActor": { // The invoked actor (ommitted if the actor wasn't invoked).
"Id": 1234, // The ID of the actor.
"State": { // The actor's state object (may change between network versions).
"Code": ..., // The actor's code CID.
"Head": ..., // The actor's state-root (when invoked).
"CallSeqNum": ..., // The actor's nonce.
"Balance": ..., // The actor's balance (when invoked).
"Address": ..., // Delegated address (FEVM only).
}
}
"MsgRct": ...,
"GasCharges": [],
"Subcalls": [],
}
This means the trace now contains an accurate "snapshot" of the actor at the time of the call, information that may not be present in the final state-tree (e.g., due to reverts). This will hopefully improve the performance and accuracy of indexing services.
Ethereum Tracing API (trace_block
and trace_replayBlockTransactions
)
For those with the Ethereum JSON-RPC API enabled, the experimental Ethereum Tracing API has been improved significantly and should be considered "functional". However, it's still new and should be tested extensively before relying on it. This API translates FVM traces to Ethereum-style traces, implementing the OpenEthereum trace_block
and trace_replayBlockTransactions
APIs.
This release fixes numerous bugs with this API and now ABI-encodes non-EVM inputs/outputs as if they were explicit EVM calls to handle_filecoin_method
for better block explorer compatibility.
However, there are some significant limitations:
- The Geth APIs are not implemented, only the OpenEthereum (Erigon, etc.) APIs.
- Block rewards are not (yet) included in the trace.
- Selfdestruct operations are not included in the trace.
- EVM smart contract "create" events always specify
0xfe
as the "code" for newly created EVM smart contracts.
Additionally, Filecoin is not Ethereum no matter how much we try to provide API/tooling compatibility. This API attempts to translate Filecoin semantics into Ethereum semantics as accurately as possible, but it's hardly the best source of data unless you need Filecoin to look like an Ethereum compatible chain. If you're trying to build a new integration with Filecoin, please use the native StateCompute
method instead.
GetActorEventsRaw and SubscribeActorEventsRaw
FIP-0049 introduced Actor Events that can be emitted by user programmed actors. FIP-0083 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 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.
Both GetActorEventsRaw
and SubscribeActorEventsRaw
take a filter parameter which can optionally filter events on:
Addresses
of the actor(s) emitting the event- Specific
Fields
within the event FromHeight
andToHeight
to filter events by block heightTipSetKey
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.
Events Configuration Changes
All configuration options previously under Fevm.Events
are now in the top-level Events
section along with the new Events.EnableActorEventsAPI
option mentioned above. If you have non-default options in [Events]
under [Fevm]
in your configuration file, please move them to the top-level [Events]
.
While Fevm.Events.*
options are deprecated and replaced by Events.*
, any existing custom values will be respected if their new form isn't set, but a warning will be printed to standard error upon startup. Support for these deprecated options will be removed in a future Lotus release, so please migrate your configuration promptly.
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.
Lotus CLI
The filplus
commands used for listing allocations and claims have been updated. If no argument is provided to the either command, they will list out all the allocations and claims in the verified registry actor.
The output list columns have been modified to AllocationID
and ClaimID
instead of ID.
lotus filplus list-allocations --help
NAME:
lotus filplus list-allocations - List allocations available in verified registry actor or made by a client if specified
USAGE:
lotus filplus list-allocations [command options] clientAddress
OPTIONS:
--expired list only expired allocations (default: false)
--json output results in json format (default: false)
--help, -h show help
lotus filplus list-claims --help
NAME:
lotus filplus list-claims - List claims available in verified registry actor or made by provider if specified
USAGE:
lotus filplus list-claims [command options] providerAddress
OPTIONS:
--expired list only expired claims (default: false)
--help, -h show help
Dependencies
- github.com/filecoin-project/go-state-types (v0.12.8 -> v0.13.1)
- chore: deps: update to go-state-types v13.0.0-rc.1 (filecoin-project/lotus#11662)
- chore: deps: update to go-state-types v13.0.0-rc.2 (filecoin-project/lotus#11675)
- chore: deps: update to go-multiaddr v0.12.2 (#11602) (filecoin-project/lotus#11602)
- feat: fvm: update the FVM/FFI to v4.1 (#11608) (#11612) (filecoin-project/lotus#11612)
- chore: deps: update builtin-actors, GST, verified claims tests (filecoin-project/lotus#11768)
Others
- Remove PL operated bootstrap nodes from mainnet.pi (filecoin-project/lotus#11491)
- Update epoch heights (#11637) (filecoin-project/lotus#11637)
- chore: Set upgrade heights and change codename (filecoin-project/lotus#11599)
- chore:: backport #11609 to the feat/nv22 branch (#11644) (filecoin-project/lotus#11644)
- fix: add UpgradePhoenixHeight to StateGetNetworkParams (#11648) (filecoin-project/lotus#11648)
- feat: drand quicknet: allow scheduling drand quicknet upgrade before nv22 on 2k devnet ([#11667]#11667)
- chore: backport #11632 to release/v1.26.0 (filecoin-project/lotus#11667)
- release: bump to v1.26.0-rc2 (filecoin-project/lotus#11691)
- Docs: Drand: document the meaning of "IsChained (filecoin-project/lotus#11692)
- chore: remove old calibnet bootstrappers (filecoin-project/lotus#11702)
- chore: Add lotus-provider to build to match install (filecoin-project/lotus#11616)
- new: add forest bootstrap nodes (#11636) (filecoin-project/lotus#11636)