Compare commits

...

65 Commits

Author SHA1 Message Date
a6360657ef Merge commit 'd9c24f650a7533c13777cab9ede9761919af3ea5' into v1.28.0-rc2 2024-07-08 18:02:12 +00:00
Phi-rjan
d9c24f650a
build: release: v1.28.0-rc2 (#12179) 2024-07-04 14:41:14 -04:00
Steven Allen
58c029a63b feat: api: sanity check the "to" address of outgoing messages (#12135)
* feat: api: sanity check the "to" address of outgoing messages

If the "to" address of an outgoing message is a _delegated_ address,
verify that it maps to a valid Ethereum address. This isn't a consensus
critical change, but it'll help prevent client-side address conversion
libraries from directing messages into oblivion (e.g., by
mis-translating `0xff0000....` addresses into `f410f...` addresses
instead of `f0...` addresses.

* tests for invalid delegated addresses

* fix lint

---------

Co-authored-by: aarshkshah1992 <aarshkshah1992@gmail.com>
2024-07-03 08:57:59 +04:00
edcf412c1a upgrading to upstream v1.28.0-rc1 2024-07-01 18:48:08 +00:00
9a9ec20b48 upgrading to upstream v1.27.1 2024-07-01 18:28:52 +00:00
Aarsh Shah
85abc61c17
Merge pull request #12169 from filecoin-project/aarshkshah1992/update-lotus-version-v128
chore: release: Lotus v1.28.0-rc1
2024-07-01 14:40:35 +04:00
aarshkshah1992
131a5c6e50 soft launch 2024-07-01 14:06:54 +04:00
aarshkshah1992
973c04e848 only soft laungh 2024-07-01 14:04:42 +04:00
Aarsh Shah
029fe2482c
Apply suggestions from code review
Co-authored-by: Masih H. Derkani <m@derkani.org>
2024-07-01 13:56:26 +04:00
aarshkshah1992
ab595f71f9 fix typos 2024-07-01 13:49:14 +04:00
39af063abd upgrading to upstream v1.27.1-rc3 2024-06-21 19:51:10 +00:00
492e0c3380 upgrading to upstream 1.27.1-rc2 2024-06-21 19:36:46 +00:00
3b7f71f533 upgrading to upstream v1.27.1-rc1 2024-06-21 18:48:22 +00:00
Jiaying Wang
efaa998623
Update CHANGELOG.md 2024-06-20 10:13:49 -04:00
Jiaying Wang
ef386e38a6
Merge pull request #12125 from filecoin-project/jen/v1273
build: v1.27.1-rc3
2024-06-20 10:12:50 -04:00
Jennifer Wang
ac95973278 fix go releaser and test with rc3 2024-06-20 09:45:02 -04:00
Rod Vagg
9aa0f93756 fix: release: update goreleaser config file
Fixes: https://github.com/filecoin-project/lotus/issues/12120
2024-06-20 09:33:39 -04:00
Jiaying Wang
82e35e9b42
Merge pull request #12115 from filecoin-project/jen/changlog
chore: small fix in changelog
2024-06-19 12:54:31 -04:00
Jiaying Wang
47599c5eb2
Merge pull request #12117 from filecoin-project/phi/v1271-rc2
build:  release: v1.27.2-rc2
2024-06-19 12:54:04 -04:00
Jennifer Wang
5fc21923db small fix in changelog 2024-06-19 10:56:42 -04:00
Phi-rjan
b446a39a40
build: release: v1.27.1-rc2 (#12101)
* fix: ci: do not use deprecated --debug goreleaser flag (#12086)

* chore: deals: remove forgotten graphsync references (#12084)

* chore: types: remove more items forgotten after markets (#12095)

* chore: cleanup: remove more items forgotten after markets

* .gz somehow reappeared after https://github.com/filecoin-project/lotus/pull/11625

* fix: ETH RPC API: ETH Call should use the parent state root of the subsequent tipset (#11905)

* fix eth call

* tests

* changes as per review

* changes as per review

* Update node/impl/full/eth.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* fix as per review

---------

Co-authored-by: Rod Vagg <rod@vagg.org>

* Update changelog to RC2

Update changelog to RC2

* Make gen / make docsgen-cli

Make gen / make docsgen-cli

* chore: api: the Net API/CLI now remains only on daemon

The only part of this repository that does lp2p is now lotus-daemon

Remove the CommonNet type, used exclusively bu the CLI stack

Adjust the rest of struct-memebership to match what went where

End result best seen in diff of `documentation/en/api-v0-methods-miner.md`

* Update changelog

Update changelog

* fix: events: sqlite db improvements (#12090)

* fix: events: sqlite db improvements

* fix unclosed multi-row query
* tune options to limit wal growth

Ref: https://github.com/filecoin-project/lotus/issues/12089

* fix: events: use correct context for CollectEvents transaction

* fix: events: close prepared read statement

* fix: events: close initial query; handle lint failures

* Update CHANGELOG.md

---------

Co-authored-by: Piotr Galar <piotr.galar@gmail.com>
Co-authored-by: Peter Rabbitson <ribasushi@protocol.ai>
Co-authored-by: Aarsh Shah <aarshkshah1992@gmail.com>
Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Peter Rabbitson <ribasushi@leporine.io>
2024-06-19 10:28:57 -04:00
Phi
c0d760a9ca
Update CHANGELOG.md 2024-06-17 19:51:44 +02:00
Rod Vagg
2e781e6f64
fix: events: sqlite db improvements (#12090)
* fix: events: sqlite db improvements

* fix unclosed multi-row query
* tune options to limit wal growth

Ref: https://github.com/filecoin-project/lotus/issues/12089

* fix: events: use correct context for CollectEvents transaction

* fix: events: close prepared read statement

* fix: events: close initial query; handle lint failures
2024-06-17 19:25:48 +02:00
Phi
26235d753e
Update changelog
Update changelog
2024-06-17 11:54:19 +02:00
Peter Rabbitson
03fb2e21e5
chore: api: the Net API/CLI now remains only on daemon
The only part of this repository that does lp2p is now lotus-daemon

Remove the CommonNet type, used exclusively bu the CLI stack

Adjust the rest of struct-memebership to match what went where

End result best seen in diff of `documentation/en/api-v0-methods-miner.md`
2024-06-17 11:30:41 +02:00
Phi
608184cb83
Make gen / make docsgen-cli
Make gen / make docsgen-cli
2024-06-17 11:05:45 +02:00
Phi
5414ca990b
Update changelog to RC2
Update changelog to RC2
2024-06-17 10:50:42 +02:00
Aarsh Shah
9772b1c1a5
fix: ETH RPC API: ETH Call should use the parent state root of the subsequent tipset (#11905)
* fix eth call

* tests

* changes as per review

* changes as per review

* Update node/impl/full/eth.go

Co-authored-by: Rod Vagg <rod@vagg.org>

* fix as per review

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
2024-06-17 10:42:55 +02:00
Peter Rabbitson
ab1cd85afd
chore: types: remove more items forgotten after markets (#12095)
* chore: cleanup: remove more items forgotten after markets

* .gz somehow reappeared after https://github.com/filecoin-project/lotus/pull/11625
2024-06-17 10:38:18 +02:00
Peter Rabbitson
6f1fc67f78
chore: deals: remove forgotten graphsync references (#12084) 2024-06-17 10:31:39 +02:00
Piotr Galar
7f4e3166ab
fix: ci: do not use deprecated --debug goreleaser flag (#12086) 2024-06-17 10:29:45 +02:00
Phi-rjan
6e13eac5d5
Merge pull request #12077 from filecoin-project/prep-v1271-rc1
chore: release:  Prep v1.27.1-rc1
2024-06-11 14:30:01 +01:00
Phi
018bda1de7
Update date and upgrade warnings
Update date and upgrade warnings
2024-06-10 09:51:14 +01:00
Phi
991c356eba
Add Lotus-Miner / Curio related changes
Add Lotus-Miner / Curio related changes
2024-06-10 09:51:14 +01:00
Phi
8f2c4bb12a
Bump NodeBuildVersion to v1.27.1-rc1
Bump NodeBuildVersion to v1.27.1-rc1
2024-06-10 09:51:14 +01:00
Phi
961039c5d9
Update changelog
Update changelog
2024-06-10 09:51:13 +01:00
Phi
821836dc3e
Bump version - make gen/make docsgen
Bump version - make gen/make docsgen
2024-06-10 09:31:26 +01:00
95c42dc5c4 Merging upstream v1.27.0 2024-05-30 19:45:41 +00:00
3cd3cb6cc1 Merge commit '4daac14f12d4120dc676efdda4a8f5a3b5b0709f' into v1.27.0-rc3 2024-05-23 15:23:36 +00:00
9122a41d42 Merge commit 'bbcad8a8dca52cc8e393ba092a4cfd9a85491076' into HEAD 2024-05-23 15:10:43 +00:00
Phi-rjan
4daac14f12
Merge pull request #12003 from filecoin-project/backports-rc3
build: release: v1.27.0-rc3
2024-05-17 09:19:27 +02:00
Phi
f0ea83a01d
Update changelog
Update changelog with the deprecate circle-ci
2024-05-16 14:10:19 +02:00
Piotr Galar
4a101f40bb
ci: deprecate circle ci in favour of github actions (#11786) 2024-05-16 13:55:35 +02:00
Phi
c1955923da
Update changelog and version
Update changelog and version
2024-05-16 12:54:35 +02:00
Aarsh Shah
f60c1ce7e6
feat: libp2p: Lotus stream cleanup (#11993)
* set stream deadlines in Lotus

* reduce timeout

* whitelist bootstrappers

* fix tests
2024-05-16 12:19:33 +02:00
Rod Vagg
95f1533c9b
fix: copy Flags field from SectorOnChainInfo
Fixes: https://github.com/filecoin-project/lotus/issues/11962
2024-05-16 11:08:56 +02:00
Aarsh Shah
75f7e4571e
add ETH addrs API to Gateway (#11979) 2024-05-16 11:03:35 +02:00
Rod Vagg
62961c3eee
chore: update go-data-transfer and go-graphsync 2024-05-16 10:58:33 +02:00
Phi-rjan
feeab1bc80
chore: remove unmaintained bootstrappers (#11983)
* chore: remove unmaintained bootstrappers

chore: remove unmaintained bootstrappers

* Update mainnet.pi fixing typoed domain

fixing typo for 1475.io 'bootstarp' -> 'bootstrap'

* Update mainnet.pi

apparently the actual hostname is typoed. so bootstarp it is.

---------

Co-authored-by: smagdali <stefan@fil.org>
2024-05-16 10:38:04 +02:00
Phi-rjan
bbcad8a8dc
Merge pull request #11972 from filecoin-project/prep-v1270-rc2
build: release: v1.27.0-rc2
2024-05-07 20:26:50 +02:00
Phi
fc469bad89
Typo fixes, and more changelog updates
Typo fixes, and more changelog updates
2024-05-07 13:18:33 +02:00
Phi
4f061191a7
Prep v1.27.0-rc2
Prep v1.27.0-rc2
2024-05-07 11:28:20 +02:00
Phi
ceda4174b9
Bump pubsub-dep
Bump pubsub-dep
2024-05-07 09:56:22 +02:00
20640c0622 resolve version conflict 2024-05-02 18:55:32 +00:00
5de49e53bc resolve merge conflicts 2024-05-02 17:03:26 +00:00
Phi-rjan
f415a77173
build: release: v1.27.0-rc1 (#11947)
* chore: Set version as v1.27.0-rc1

Set version as v1.27.0-rc1, run make gen & make docsgen-cli

* Update changelog

Update changelog

* Update changelog

Update changelog based on feedback
2024-05-01 10:05:02 +02:00
73783fcdfb Merge tag 'tags/v1.26.3' into 1.26.3 2024-04-23 17:00:39 +00:00
Phi-rjan
560826d5c6
release: v1.26.3 (#11908) (#11915)
* deps: update dependencies to address migration memory bloat

to address memory concerns during a heavy migration

Ref: https://github.com/filecoin-project/go-state-types/pull/260
Ref: https://github.com/whyrusleeping/cbor-gen/pull/96
Ref: https://github.com/filecoin-project/go-amt-ipld/pull/90

* release: prep v1.26.3 patch

Prep v1.26.3 patch release:
- Update changelog, version and make gen + make docsgen-cli

* deps: update cbor-gen to tagged version

deps: update cbor-gen to tagged version

* deps: update go-state-types to tagged version

deps: update go-state-types to tagged version v0.13.2

* chore: deps: update go-state-types to v0.13.3

Fixes a panic when we have fewer than 1k proposals.

---------

Co-authored-by: Rod Vagg <rod@vagg.org>
Co-authored-by: Steven Allen <steven@stebalien.com>
2024-04-22 20:36:52 -04:00
e461e672ea v1.26.2
Git-EVTag-v0-SHA512: f94cc711cb948b08eea54dedd0ddedf9b3443f4b1ea4e606154264b39f8a47f4949283c9a76c1564ce59e3aeab3e3232bc4a9491138035597159cb322f85e2f4
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEE3Y8jOLrnUB491ax4wnN5L32DVF0FAmYUeacACgkQwnN5L32D
 VF164Af+KAWPeOrXgqsf232pT17KibNLRAmUWpkaUGJWTUKenZpWw8CnG+jScGxa
 pDHU5IlODuxHqfSAz9plhqBVabQLeigqyC79awWTaZR66InRYa0s3wE+tKiSn9FG
 ls/e6i364v1Zn3C9sxKiLudzZ2WC4rVdhEk4CB1e05MkLlx8FlONFuBSenBYbjRF
 EjQu//J+P8Mew2niL1vDdAKPegspcg0GYlN2ORag/HNw13N4M7YoN5YyrM9h39Ga
 q5gUtSA1UeGPO+MGHDmttVwmX9zP8Pby7XPA5bGf/vFYHUjZH3CWfNoXCHt1U1Hh
 BfxfZsz/hHfir/GMFV9Qmb4qTP8MRA==
 =pNd1
 -----END PGP SIGNATURE-----

Merge tag 'tags/v1.26.2' into 1.26.2

v1.26.2
Git-EVTag-v0-SHA512: f94cc711cb948b08eea54dedd0ddedf9b3443f4b1ea4e606154264b39f8a47f4949283c9a76c1564ce59e3aeab3e3232bc4a9491138035597159cb322f85e2f4
2024-04-09 15:34:47 +00:00
e2712a9157 fix: Eth API: accept input data in call arguments under field 'input' (#11505)
The correct name for this field is 'input' according to the Ethereum specs [0].
However, for the longest time, clients have been using 'data' and servers have been
lenient to accept both, preferring 'input' over 'data' when both appear.

Our lack of support for 'input' had gone unnoticed until go-ethereum decided
to adjust their ethclient implementation to issue eth_call and eth_estimateGas
requests with the 'input' field instead of 'data' [1]. This suddenly broke apps
using this client against Lotus' Eth API.

[0]: https://github.com/ethereum/execution-apis/blob/main/src/schemas/transaction.yaml#L33-L35
[1]: ethereum/go-ethereum#28078

Co-authored-by: raulk <raul.kripalani@gmail.com>
2024-04-04 16:35:48 +00:00
i-norden
1735a6f308 add index to event.emitter_addr 2024-03-28 02:10:00 +00:00
Fridrik Asmundsson
75c7f16765 Add block param to EthEstimateGas 2024-03-28 02:10:00 +00:00
i-norden
2e372edde4 add index to event.emitter_addr 2024-03-28 02:09:59 +00:00
i-norden
ff21559244 add index to event_entry.key 2024-03-28 02:09:59 +00:00
Ian Norden
0a29aa0b6f fix: api: exclude reverted events in eth_getLogs results (#11318)
* exclude reverted events from results returned by eth_getLogs

* unit test

* update CHANGELOG.md
2024-03-28 02:09:59 +00:00
23 changed files with 190 additions and 34 deletions

1
.gitignore vendored
View File

@ -1,6 +1,7 @@
/lotus
/lotus-miner
/lotus-worker
/lotus-provider
/lotus-seed
/lotus-health
/lotus-chainwatch

View File

@ -12,16 +12,18 @@
## Improvements
# v1.28.0-rc1 / 2024-07-01
# v1.28.0-rc2 / 2024-07-04
This is the first release candidate of the upcoming MANDATORY Lotus v1.28.0 release, which will deliver the Filecoin network version 23, codenamed Waffle 🧇.
This is the second release candidate of the upcoming MANDATORY Lotus v1.28.0 release, which will deliver the Filecoin network version 23, codenamed Waffle 🧇.
**This release canidate does NOT set a calibration network upgrade epoch, it will be added in the second release candidate, expected to be released July 4th. This release candidate does NOT set the mainnet upgrade epoch yet, which will be updated in the final release.**
**This release candidate sets the calibration network to upgrade at epoch 1779094, corresponding to 2024-07-11T12:00:00Z.** This release does NOT set the mainnet upgrade epoch yet, in which will be updated in the final release.
☢️ Upgrade Warnings ☢️
If you are running the `v1.26.0` or an earlier version of Lotus, please go through the `Upgrade Warnings` section for the `v1.27.*` releases, before upgrading to this RC.
- This upgrade includes an additional migration to the events database. Node operators running Lotus with events turned on (off by default) may experience some delay in initial start-up of Lotus as a minor database migration takes place. See [filecoin-project/lotus#12080](https://github.com/filecoin-project/lotus/pull/12080) for full details.
## The Filecoin network version 23 delivers the following FIPs:
- [FIP-0065: Ignore built-in market locked balance in circulating supply calculation](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0065.md)
@ -30,7 +32,9 @@ If you are running the `v1.26.0` or an earlier version of Lotus, please go throu
- [FIP-0085: Convert f090 Mining Reserve Actor to Keyless Account Actor](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0085.md)
- [FIP-0091: Add support for legacy Ethereum transactions](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0091.md)
- [FIP-0092: NI-PoRep](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0092.md)
- [F3 (Fast Finality) Soft Launch](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0086.md)
- [FIP-0086: Fast Finality Soft Launch](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0086.md)
Note that we are only doing a "soft launch"/"passive testing" for F3 (Fast Finality) i.e. FIP-0086 in NV23. Please see [this doc](https://docs.google.com/document/d/14hMFN95_AsByBh7iMc4r_czUgg8tfjHQ1gTsmmHZ8jI/edit#heading=h.dhzqs3lisv24) for more details.
## v14 Builtin Actor Bundle
The actor bundles for the **calibration network** can be checked as follows:
@ -61,7 +65,15 @@ verifiedregistry bafk2bzaceczw2kp6gjjdcjbso7mewp7guik7gr525pal6dotdja2lrct6ok3c
```
## Migration
The NV23 upgrade migration is expected to be extremely light as only FIP-0085 requires a migration. With don't expect null tipsets after the upgrade epoch or heavy block validation times. We will updated this sections once we have ran the final benchmarks.
All node operators, including storage providers, should be aware that ONE pre-migration is being scheduled 120 epochs before the network upgrade. The migration for the NV23 upgrade is expected to be light with no heavy pre-migrations, here are some expected timings and resource consumption numbers:
- Pre-Migration is expected to take less then 1 minute
- The migration is expected to take less then 30 seconds on a node with a NVMe-drive and a newer CPU. For nodes running on slower disks/CPU, it is still expected to take less then 1 minute.
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.
For certain node operators, such as full archival nodes or systems that need to keep large amounts of state (RPC providers), we recommend skipping the pre-migration and run the non-cached migration (i.e., just running the migration at the network upgrade epoch), and schedule for some additional downtime. Operators of such nodes can read the [How to disable premigration in network upgrade tutorial.](https://lotus.filecoin.io/kb/disable-premigration/)
## Dependencies
- github.com/filecoin-project/go-state-types (`v0.14.0-dev` -> `v0.14.0-rc5`)
@ -71,7 +83,7 @@ The NV23 upgrade migration is expected to be extremely light as only FIP-0085 re
## Others
- Soft launch for Filecoin F3 (https://github.com/filecoin-project/lotus/pull/12119)
- Soft launch of F3 (https://github.com/filecoin-project/lotus/pull/12119)
- NI-PoRep changes (https://github.com/filecoin-project/lotus/pull/12130)
- Fixes for the ETH events API (https://github.com/filecoin-project/lotus/pull/12080)
- Support for legacy Ethereum transactions (https://github.com/filecoin-project/lotus/pull/11969)
@ -970,6 +982,7 @@ Lotus-workers can now be built to leverage the SupraSeal C2 sealing optimization
- fix: lotus-provider: lotus-provider msg sending ([filecoin-project/lotus#11480](https://github.com/filecoin-project/lotus/pull/11480))
- fix: lotus-provider: Fix winning PoSt ([filecoin-project/lotus#11483](https://github.com/filecoin-project/lotus/pull/11483))
- chore: fix: sql Scan cannot write to an object ([filecoin-project/lotus#11487](https://github.com/filecoin-project/lotus/pull/11487))
- fix: Exclude reverted events in `eth_getLogs` results [filecoin-project/lotus#11318](https://github.com/filecoin-project/lotus/pull/11318)
## Dependencies
- deps: update go-libp2p to v0.28.1 ([filecoin-project/lotus#10998](https://github.com/filecoin-project/lotus/pull/10998))
@ -4292,6 +4305,7 @@ This is a **highly recommended** but optional Lotus v1.11.1 release that introd
- Release Template: remove binary validation step ([filecoin-project/lotus#6709](https://github.com/filecoin-project/lotus/pull/6709))
- Reset of the interop network ([filecoin-project/lotus#6689](https://github.com/filecoin-project/lotus/pull/6689))
- Update version.go to 1.11.1 ([filecoin-project/lotus#6621](https://github.com/filecoin-project/lotus/pull/6621))
- chore: pin golanglint-ci to v1.58.2 ([filecoin-project/lotus#12054](https://github.com/filecoin-project/lotus/pull/12054))
## Contributors

View File

@ -2,7 +2,7 @@
"openrpc": "1.2.6",
"info": {
"title": "Lotus RPC API",
"version": "1.28.0-rc1"
"version": "1.28.0-rc2"
},
"methods": [
{

View File

@ -2,7 +2,7 @@
"openrpc": "1.2.6",
"info": {
"title": "Lotus RPC API",
"version": "1.28.0-rc1"
"version": "1.28.0-rc2"
},
"methods": [
{

View File

@ -2,7 +2,7 @@
"openrpc": "1.2.6",
"info": {
"title": "Lotus RPC API",
"version": "1.28.0-rc1"
"version": "1.28.0-rc2"
},
"methods": [
{

View File

@ -2,7 +2,7 @@
"openrpc": "1.2.6",
"info": {
"title": "Lotus RPC API",
"version": "1.28.0-rc1"
"version": "1.28.0-rc2"
},
"methods": [
{

View File

@ -83,8 +83,7 @@ const UpgradeWatermelonFix2Height = -101
const UpgradeCalibrationDragonFixHeight = -102
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
UpgradePhoenixHeight: DrandQuicknet,
0: DrandQuicknet,
}
var SupportedProofTypes = []abi.RegisteredSealProof{
@ -160,8 +159,7 @@ func init() {
UpgradePhoenixHeight = getUpgradeHeight("LOTUS_PHOENIX_HEIGHT", UpgradePhoenixHeight)
DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
UpgradePhoenixHeight: DrandQuicknet,
0: DrandQuicknet,
}
BuildType |= Build2k
@ -191,5 +189,5 @@ const Eip155ChainId = 31415926
var WhitelistedBlock = cid.Undef
const F3Enabled = true
const f3Enabled = true
const F3BootstrapEpoch abi.ChainEpoch = 100

View File

@ -16,8 +16,7 @@ import (
)
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
UpgradePhoenixHeight: DrandQuicknet,
0: DrandQuicknet,
}
const GenesisNetworkVersion = network.Version22
@ -107,5 +106,5 @@ const Eip155ChainId = 3141592
var WhitelistedBlock = cid.Undef
const F3Enabled = true
const f3Enabled = true
const F3BootstrapEpoch abi.ChainEpoch = 200

View File

@ -98,8 +98,8 @@ const UpgradePhoenixHeight = UpgradeDragonHeight + 120
// 2024-04-03T11:00:00Z
const UpgradeCalibrationDragonFixHeight = 1493854
// ?????
const UpgradeWaffleHeight = 999999999999999
// 2024-07-11T12:00:00Z
const UpgradeWaffleHeight = 1779094
var SupportedProofTypes = []abi.RegisteredSealProof{
abi.RegisteredSealProof_StackedDrg32GiBV1,
@ -152,5 +152,5 @@ const Eip155ChainId = 314159
var WhitelistedBlock = cid.Undef
const F3Enabled = false
const F3BootstrapEpoch abi.ChainEpoch = -1
const f3Enabled = true
const F3BootstrapEpoch abi.ChainEpoch = UpgradeWaffleHeight + 100

View File

@ -69,8 +69,7 @@ const UpgradeWatermelonFix2Height = -2
const UpgradeCalibrationDragonFixHeight = -3
var DrandSchedule = map[abi.ChainEpoch]DrandEnum{
0: DrandMainnet,
UpgradePhoenixHeight: DrandQuicknet,
0: DrandQuicknet,
}
var SupportedProofTypes = []abi.RegisteredSealProof{
@ -146,5 +145,5 @@ const Eip155ChainId = 3141592
var WhitelistedBlock = cid.Undef
const F3Enabled = true
const f3Enabled = true
const F3BootstrapEpoch abi.ChainEpoch = 1000

View File

@ -169,5 +169,5 @@ const Eip155ChainId = 314
// WhitelistedBlock skips checks on message validity in this block to sidestep the zero-bls signature
var WhitelistedBlock = MustParseCid("bafy2bzaceapyg2uyzk7vueh3xccxkuwbz3nxewjyguoxvhx77malc2lzn2ybi")
const F3Enabled = false
const f3Enabled = false
const F3BootstrapEpoch abi.ChainEpoch = -1

View File

@ -1,6 +1,8 @@
package build
import (
"os"
"github.com/ipfs/go-cid"
"github.com/libp2p/go-libp2p/core/protocol"
@ -49,3 +51,8 @@ func MustParseCid(c string) cid.Cid {
return ret
}
func IsF3Enabled() bool {
const F3DisableEnvKey = "LOTUS_DISABLE_F3"
return f3Enabled && len(os.Getenv(F3DisableEnvKey)) == 0
}

View File

@ -39,7 +39,7 @@ func BuildTypeString() string {
}
// NodeBuildVersion is the local build version of the Lotus daemon
const NodeBuildVersion string = "1.28.0-rc1"
const NodeBuildVersion string = "1.28.0-rc2"
func NodeUserVersion() BuildVersion {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
@ -50,7 +50,7 @@ func NodeUserVersion() BuildVersion {
}
// MinerBuildVersion is the local build version of the Lotus miner
const MinerBuildVersion = "1.28.0-rc1"
const MinerBuildVersion = "1.28.0-rc2"
func MinerUserVersion() BuildVersion {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {

View File

@ -7,7 +7,7 @@ USAGE:
lotus-miner [global options] command [command options] [arguments...]
VERSION:
1.28.0-rc1
1.28.0-rc2
COMMANDS:
init Initialize a lotus miner repo

View File

@ -7,7 +7,7 @@ USAGE:
lotus-worker [global options] command [command options] [arguments...]
VERSION:
1.28.0-rc1
1.28.0-rc2
COMMANDS:
run Start lotus worker

View File

@ -7,7 +7,7 @@ USAGE:
lotus [global options] command [command options] [arguments...]
VERSION:
1.28.0-rc1
1.28.0-rc2
COMMANDS:
daemon Start a lotus daemon process

View File

@ -8,6 +8,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/lotus/api"
@ -18,6 +19,33 @@ import (
const mPoolThrottle = time.Millisecond * 100
const mPoolTimeout = time.Second * 10
func TestMemPoolPushOutgoingInvalidDelegated(t *testing.T) {
//stm: @CHAIN_MEMPOOL_PENDING_001, @CHAIN_STATE_WAIT_MSG_001, @CHAIN_MEMPOOL_CAP_GAS_FEE_001
//stm: @CHAIN_MEMPOOL_PUSH_002
ctx := context.Background()
firstNode, _, _, ens := kit.EnsembleTwoOne(t, kit.MockProofs())
ens.InterconnectAll()
kit.QuietMiningLogs()
sender := firstNode.DefaultKey.Address
badTo, err := address.NewFromString("f410f74aaaaaaaaaaaaaaaaaaaaaaaaac5sh2bf3lgta")
require.NoError(t, err)
bal, err := firstNode.WalletBalance(ctx, sender)
require.NoError(t, err)
toSend := big.Div(bal, big.NewInt(10))
msg := &types.Message{
From: sender,
Value: toSend,
To: badTo,
}
_, err = firstNode.MpoolPushMessage(ctx, msg, nil)
require.Error(t, err)
require.Contains(t, err.Error(), "is a delegated address but not a valid Eth Address")
}
func TestMemPoolPushSingleNode(t *testing.T) {
//stm: @CHAIN_MEMPOOL_CREATE_MSG_CHAINS_001, @CHAIN_MEMPOOL_SELECT_001
//stm: @CHAIN_MEMPOOL_PENDING_001, @CHAIN_STATE_WAIT_MSG_001, @CHAIN_MEMPOOL_CAP_GAS_FEE_001

View File

@ -151,7 +151,7 @@ var ChainNode = Options(
Override(HandleIncomingBlocksKey, modules.HandleIncomingBlocks),
),
If(build.F3Enabled, Override(new(*lf3.F3), lf3.New)),
If(build.IsF3Enabled(), Override(new(*lf3.F3), lf3.New)),
)
func ConfigFullNode(c interface{}) Option {

View File

@ -141,7 +141,7 @@ func ConfigStorageMiner(c interface{}) Option {
Override(new(config.HarmonyDB), cfg.HarmonyDB),
Override(new(harmonydb.ITestID), harmonydb.ITestID("")),
Override(new(*ctladdr.AddressSelector), modules.AddressSelector(&cfg.Addresses)),
If(build.F3Enabled, Override(F3Participation, modules.F3Participation)),
If(build.IsF3Enabled(), Override(F3Participation, modules.F3Participation)),
)
}

View File

@ -734,6 +734,7 @@ func (a *EthModule) EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (eth
)
for blocksIncluded < int(params.BlkCount) && ts.Height() > 0 {
basefee = ts.Blocks()[0].ParentBaseFee
_, msgs, rcpts, err := executeTipset(ctx, ts, a.Chain, a.StateAPI)
if err != nil {
return ethtypes.EthFeeHistory{}, xerrors.Errorf("failed to retrieve messages and receipts for height %d: %w", ts.Height(), err)

View File

@ -16,6 +16,7 @@ import (
"github.com/filecoin-project/lotus/chain/messagepool"
"github.com/filecoin-project/lotus/chain/messagesigner"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/lotus/chain/types/ethtypes"
"github.com/filecoin-project/lotus/node/modules/dtypes"
)
@ -131,14 +132,24 @@ func (a *MpoolAPI) MpoolClear(ctx context.Context, local bool) error {
}
func (m *MpoolModule) MpoolPush(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) {
if err := sanityCheckOutgoingMessage(&smsg.Message); err != nil {
return cid.Undef, xerrors.Errorf("message %s from %s with nonce %d failed sanity check: %w", smsg.Cid(), smsg.Message.From, smsg.Message.Nonce, err)
}
return m.Mpool.Push(ctx, smsg, true)
}
func (a *MpoolAPI) MpoolPushUntrusted(ctx context.Context, smsg *types.SignedMessage) (cid.Cid, error) {
if err := sanityCheckOutgoingMessage(&smsg.Message); err != nil {
return cid.Undef, xerrors.Errorf("message %s from %s with nonce %d failed sanity check: %w", smsg.Cid(), smsg.Message.From, smsg.Message.Nonce, err)
}
return a.Mpool.PushUntrusted(ctx, smsg)
}
func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message, spec *api.MessageSendSpec) (*types.SignedMessage, error) {
if err := sanityCheckOutgoingMessage(msg); err != nil {
return nil, xerrors.Errorf("message from %s failed sanity check: %w", msg.From, err)
}
cp := *msg
msg = &cp
inMsg := *msg
@ -223,6 +234,11 @@ func (a *MpoolAPI) MpoolPushMessage(ctx context.Context, msg *types.Message, spe
}
func (a *MpoolAPI) MpoolBatchPush(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) {
for _, msg := range smsgs {
if err := sanityCheckOutgoingMessage(&msg.Message); err != nil {
return nil, xerrors.Errorf("message %s from %s with nonce %d failed sanity check: %w", msg.Cid(), msg.Message.From, msg.Message.Nonce, err)
}
}
var messageCids []cid.Cid
for _, smsg := range smsgs {
smsgCid, err := a.Mpool.Push(ctx, smsg, true)
@ -235,6 +251,11 @@ func (a *MpoolAPI) MpoolBatchPush(ctx context.Context, smsgs []*types.SignedMess
}
func (a *MpoolAPI) MpoolBatchPushUntrusted(ctx context.Context, smsgs []*types.SignedMessage) ([]cid.Cid, error) {
for _, msg := range smsgs {
if err := sanityCheckOutgoingMessage(&msg.Message); err != nil {
return nil, xerrors.Errorf("message %s from %s with nonce %d failed sanity check: %w", msg.Cid(), msg.Message.From, msg.Message.Nonce, err)
}
}
var messageCids []cid.Cid
for _, smsg := range smsgs {
smsgCid, err := a.Mpool.PushUntrusted(ctx, smsg)
@ -247,6 +268,11 @@ func (a *MpoolAPI) MpoolBatchPushUntrusted(ctx context.Context, smsgs []*types.S
}
func (a *MpoolAPI) MpoolBatchPushMessage(ctx context.Context, msgs []*types.Message, spec *api.MessageSendSpec) ([]*types.SignedMessage, error) {
for i, msg := range msgs {
if err := sanityCheckOutgoingMessage(msg); err != nil {
return nil, xerrors.Errorf("message #%d from %s with failed sanity check: %w", i, msg.From, err)
}
}
var smsgs []*types.SignedMessage
for _, msg := range msgs {
smsg, err := a.MpoolPushMessage(ctx, msg, spec)
@ -277,3 +303,19 @@ func (a *MpoolAPI) MpoolGetNonce(ctx context.Context, addr address.Address) (uin
func (a *MpoolAPI) MpoolSub(ctx context.Context) (<-chan api.MpoolUpdate, error) {
return a.Mpool.Updates(ctx)
}
func sanityCheckOutgoingMessage(msg *types.Message) error {
// Check that the message's TO address is a _valid_ Eth address if it's a delegated address.
//
// It's legal (from a consensus perspective) to send funds to any 0xf410f address as long as
// the payload is at most 54 bytes, but the vast majority of this address space is
// essentially a black-hole. Unfortunately, the conversion from 0x addresses to Filecoin
// native addresses has a few pitfalls (especially with respect to masked ID addresses), so
// we've added this check to the API to avoid accidentally (and avoidably) sending messages
// to these black-hole addresses.
if msg.To.Protocol() == address.Delegated && !ethtypes.IsEthAddress(msg.To) {
return xerrors.Errorf("message recipient %s is a delegated address but not a valid Eth Address", msg.To)
}
return nil
}

View File

@ -0,0 +1,67 @@
package full
import (
"context"
"testing"
"github.com/stretchr/testify/require"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/filecoin-project/lotus/chain/types"
)
func TestSanityCheckOutgoingMessage(t *testing.T) {
// fails for invalid delegated address
badTo, err := address.NewFromString("f410f74aaaaaaaaaaaaaaaaaaaaaaaaac5sh2bf3lgta")
require.NoError(t, err)
msg := &types.Message{
To: badTo,
}
err = sanityCheckOutgoingMessage(msg)
require.Error(t, err)
require.Contains(t, err.Error(), "is a delegated address but not a valid Eth Address")
// works for valid delegated address
goodTo, err := address.NewFromString("f410faxfebiima2gp4lduo2k3vt2iuqapuk3logeftky")
require.NoError(t, err)
msg = &types.Message{
To: goodTo,
}
err = sanityCheckOutgoingMessage(msg)
require.NoError(t, err)
// works for valid non-delegated address
goodTo, err = address.NewFromString("f1z762skeib2v6zlkvhywmjxbv3dxoiv4hmb6gs4y")
require.NoError(t, err)
msg = &types.Message{
To: goodTo,
}
err = sanityCheckOutgoingMessage(msg)
require.NoError(t, err)
}
func TestMpoolPushInvalidDelegatedAddressFails(t *testing.T) {
badTo, err := address.NewFromString("f410f74aaaaaaaaaaaaaaaaaaaaaaaaac5sh2bf3lgta")
require.NoError(t, err)
module := &MpoolModule{}
m := &MpoolAPI{
MpoolModuleAPI: module,
}
smsg := &types.SignedMessage{
Message: types.Message{
From: badTo,
To: badTo,
},
Signature: crypto.Signature{
Type: crypto.SigTypeSecp256k1,
Data: []byte("signature"),
},
}
_, err = m.MpoolPush(context.Background(), smsg)
require.Error(t, err)
require.Contains(t, err.Error(), "is a delegated address but not a valid Eth Address")
}

View File

@ -381,7 +381,7 @@ func GossipSub(in GossipIn) (service *pubsub.PubSub, err error) {
build.IndexerIngestTopic(in.Nn),
}
if build.F3Enabled {
if build.IsF3Enabled() {
allowTopics = append(allowTopics, gpbft.NetworkName(in.Nn).PubSubTopic())
}