Commit Graph

1639 Commits

Author SHA1 Message Date
LexLuthr
3f9b6837c9 feat: api: new verified registry methods to get all allocations and claims (#11631)
* new verireg methods

* update changelog and add itest

* update itest and cli

* update new method's support till v9

* remove gateway APIs

* fix cli internal var names
2024-03-22 07:00:28 +01:00
Phi
d6d32ec593 chore: Upgrade heights and codename
Update upgrade heights

Co-Authored-By: Steven Allen <steven@stebalien.com>
2024-03-22 07:00:28 +01:00
Phi-rjan
896688c670 feat: fvm: update the FVM/FFI to v4.1 (#11608) (#11612)
This:

1. Adds nv22 support.
2. Updates the message tracing format.

Co-authored-by: Steven Allen <steven@stebalien.com>
2024-03-22 07:00:28 +01:00
Łukasz Magiera
6a0f16b084 feat: sealing: Support nv22 DDO features in the sealing pipeline (#11226)
* Initial work supporting DDO pieces in lotus-miner

* sealing: Update pipeline input to operate on UniversalPiece

* sealing: Update pipeline checks/sealing states to operate on UniversalPiece

* sealing: Make pipeline build with UniversalPiece

* move PieceDealInfo out of api

* make gen

* make sealing pipeline unit tests pass

* fix itest ensemble build

* don't panic in SectorsStatus with deals

* stop linter from complaining about checkPieces

* fix sector import tests

* mod tidy

* sealing: Add logic for (pre)committing DDO sectors

* sealing: state-types with method defs

* DDO non-snap pipeline works(?), DDO Itests

* DDO support in snapdeals pipeline

* make gen

* update actor bundles

* update the gst market fix

* fix: chain: use PreCommitSectorsBatch2 when setting up genesis

* some bug fixes

* integration working changes

* update actor bundles

* Make TestOnboardRawPieceSnap pass

* Appease the linter

* Make deadlines test pass with v12 actors

* Update go-state-types, abstract market DealState

* make gen

* mod tidy, lint fixes

* Fix some more tests

* Bump version in master

Bump version in master

* Make gen

Make gen

* fix sender

* fix: lotus-provider: Fix winning PoSt

* fix: sql Scan cannot write to an object

* Actually show miner-addrs in info-log

Actually show miner-addrs in lotus-provider info-log

* [WIP] feat: Add nv22 skeleton

Addition of Network Version 22 skeleton

* update FFI

* ddo is now nv22

* make gen

* temp actor bundle with ddo

* use working go-state-types

* gst with v13 market migration

* update bundle, builtin.MethodsMiner.ProveCommitSectors2 -> 3

* actually working v13 migration, v13 migration itest

* Address review

* sealing: Correct DDO snap pledge math

* itests: Mixed ddo itest

* pipeline: Fix sectorWeight

* sealing: convert market deals into PAMs in mixed sectors

* sealing: make market to ddo conversion work

* fix lint

* update gst

* Update actors and GST to lastest integ branch

* commit batcher: Update ProveCommitSectors3Params builder logic

* make gen

* use builtin-actors master

* ddo: address review

* itests: Add commd assertions to ddo tests

* make gen

* gst with fixed types

* config knobs for RequireActivationSuccess

* storage: Drop obsolete flaky tasts

---------

Co-authored-by: Jennifer Wang <jiayingw703@gmail.com>
Co-authored-by: Aayush <arajasek94@gmail.com>
Co-authored-by: Shrenuj Bansal <shrenuj.bansal@protocol.ai>
Co-authored-by: Phi <orjan.roren@gmail.com>
Co-authored-by: Andrew Jackson (Ajax) <snadrus@gmail.com>
Co-authored-by: TippyFlits <james.bluett@protocol.ai>
2024-03-22 07:00:28 +01:00
TippyFlits
50a1fb8062 [WIP] feat: Add nv22 skeleton
Addition of Network Version 22 skeleton
2024-03-22 07:00:28 +01:00
Andrew Jackson (Ajax)
e102e4f31f
Merge branch 'master' into feat/sturdypost 2023-11-29 17:15:42 -06:00
Friðrik Ásmundsson
813d133c24
Merge pull request #11462 from filecoin-project/update-estimate-gas
api: Add block param to eth_estimateGas
2023-11-29 15:45:14 +00:00
Steven Allen
a34cc5e4e9
fix: eth: handle unresolvable addresses (#11433)
Correctly handle "unresolvable" to/from addresses in top-level messages in the Ethereum API. Specifically:

1. Fail if we can't resolve the from address. As far as I can tell, this should be impossible (the message statically couldn't have been included in the block if the sender didn't exist).
2. If we can't resolve the "to" address to an ID, use "max uint64" as the ID (`0xff0000000000000000000000ffffffffffffffff`). This will only happen if the transaction was reverted. It'll be a little confusing, but the alternative is to (a) use an empty address (will look like a contract creation, which is definitely wrong) or (b) use a random/hashed address which will likely be more confusing as it won't be "obviously weird".
2023-11-29 16:12:18 +04:00
Fridrik Asmundsson
a3417e7488 Make block param to EthEstimateGas optional 2023-11-29 10:26:22 +00:00
Fridrik Asmundsson
717d2a0eeb Add block param to EthEstimateGas 2023-11-28 14:57:05 +00:00
Łukasz Magiera
687ad3ae53 make db config in lotus-miner actually optional 2023-11-23 17:57:03 +01:00
Łukasz Magiera
16cc24443f Merge remote-tracking branch 'origin/master' into chore/master-into-sturdy 2023-11-22 17:26:37 +01:00
Steven Allen
d5fd4cdcc0
feat: eth: encode eth tx input as solidity ABI (#11402)
When translating "native" messages to Ethereum transactions, correctly handle parameters:

1. If the message looks like a valid "create external", treat it as a contract creation.
2. If it looks like a valid EVM invocation, decode it as such.
3. Otherwise, ABI-encode the parameters to make them look like a "handle_filecoin_method" call. This
    will help chain explorers recognize these messages.

Part of #11355
2023-11-17 20:46:49 +01:00
Steven Allen
9b4df6a4d0
fix: eth: use the correct state-tree when resolving addresses (#11387)
We need to always use the state-tree from the tipset _after_ the message
executed. If we use any other state-tree, we might not find the address
we're trying to resolve.

This change also has some implication for pending messages: there's no
guarantee we'll be able to generate a 0x-style address for a pending
native message. So, instead of trying, I've removed support for pending
native messages from the Eth API. Messages from EthAccounts will still
work, and native messages will still show up in blocks/traces, they just
won't show up as "pending". Which should affect exactly nobody.

I'm also taking this opportunity to cleanup some edge-cases:

1. Pass contexts where appropriate.
2. Remove all state access from `ethTxHashFromSignedMessage`.

Part of #11355
2023-11-17 18:20:31 +01:00
Steven Allen
06d288e92b
fix: eth: remove trace sanity check (#11385)
We added this check as a self-test to make sure that the message indices
in our trace matched up with those in the block. Unfortunately, this
only works for blocks on the main-chain, and breaks tracing of uncle
blocks (and tracing of head).
2023-11-17 18:08:58 +01:00
Aayush
5b5dd525f5 skip migration cache correctly 2023-11-09 14:14:46 -05:00
Andrew Jackson (Ajax)
23ba7faa84 Merge branch 'release/v1.25.0' into feat/sturdypost 2023-11-08 11:24:17 -06:00
Aayush
65591841f9 skip migration cache correctly 2023-11-08 17:14:02 +01:00
Łukasz Magiera
b243c405b4
Merge pull request #11353 from CIDgravity/improve-sectors-summary-call
feat: sealing: load SectorsSummary from sealing SectorStats instead of calling API each time
2023-11-07 13:22:18 +01:00
Andrew Jackson (Ajax)
848c20d15f Merge branch 'master' into feat/sturdypost 2023-11-06 16:10:57 -06:00
Steven Allen
cff785fa37
fix: eth: correctly encode and simplify native input/output encoding (#11382)
* chore: eth: move & rename input/output encoding functions

These are shared functions, so I'm moving them to the utils library.

* fix: eth: correctly encode and simplify native input/output encoding

When generating eth traces, we encode "native" message inputs/outputs
to "solidity ABI" by formatting the inputs/outputs the same way we do in
FEVM's "handle_native_method". However, we had quite a few bugs with the
implementation:

1. We were right-aligning 64bit values in 256bit words, instead of
left-aligning (as we should given that these values are big-endian).
2. The return-value encoding wasn't correctly handling lengths.

This patch:

1. Fixes those bugs.
2. Deduplicates the logic (we're doing _basically_ the same thing in
both cases).
3. Removes all error paths (these functions can't fail).
2023-11-06 09:41:22 -08:00
Florian RUEN
c0c4e6bf35
fix: add lk.Lock() and move the map copy to avoid miner crash 2023-11-03 15:38:20 +01:00
Florian RUEN
02929dd166
feat: load SectorsSummmary from SectorStats instead of calling API (faster) 2023-11-03 15:38:19 +01:00
Steven Allen
65085d17c0 fix: api: compute gasUsedRatio based on max gas in the tipset (#11354)
We were computing this based on the max block gas, but this is
incorrect. The new value isn't entirely correct either (we should
probably compute an average of the gas used in each block in the
tipset?), but it's good enough.

fixes #10515
2023-11-02 07:57:54 +08:00
Steven Allen
b8f7109988 fix: api: compute the effective gas cost with the correct base-fee (#11357)
fixes #11252
2023-11-02 07:57:40 +08:00
Steven Allen
3f00691f26
fix: api: compute gasUsedRatio based on max gas in the tipset (#11354)
We were computing this based on the max block gas, but this is
incorrect. The new value isn't entirely correct either (we should
probably compute an average of the gas used in each block in the
tipset?), but it's good enough.

fixes #10515
2023-10-27 07:37:51 -07:00
Steven Allen
420f33017e
fix: api: compute the effective gas cost with the correct base-fee (#11357)
fixes #11252
2023-10-27 07:37:16 -07:00
Steven Allen
6e22c08c1d
fix: api: return errors on failure to lookup an eth txn receipt (#11329)
All these cases here are actually errors and returning `nil` makes this
hard to debug. We likely returned nil in the past to be "best effort"
but, as far as I can tell, we should only hit these error cases if
something is actually wrong.

part of #11325
2023-10-24 12:13:45 -07:00
Andrew Jackson (Ajax)
2bc4951d79 Merge branch 'release/v1.24.0' into release/v1.25.0 2023-10-17 10:19:51 -05:00
Aayush
5e76b05b17 Merge branch 'feat/nv21' into asr/merge-feat-nv21 2023-10-16 11:13:33 -04:00
Aayush
2a644e2c04 feat: limit PoSted partitions to 3 2023-10-11 12:41:55 -04:00
Steven Allen
2fa5422581 fix: use VerifyDealForActivation in StateComputeCID
Unfortunately, ComputeDataCommitement was deprecated.
2023-09-23 17:54:39 -04:00
Łukasz Magiera
99990504b5
Merge pull request #11263 from Icarus9913/libp2p/remove-deprecated-method
fix: deps: stop using go-libp2p deprecated peer.ID.Pretty
2023-09-22 13:59:18 +02:00
Andrew Jackson (Ajax)
a520ee85d6 master-to-sturdy 2023-09-21 10:37:02 -05:00
Icarus9913
2a8ea957fa stop using go-libp2p deprecated peer.ID.Pretty
Signed-off-by: Icarus9913 <icaruswu66@qq.com>
2023-09-12 13:13:34 +08:00
Andrew Jackson (Ajax)
7ef93448fb eth_filter flake debug 2023-09-08 11:17:51 -05:00
Phi
024dd5e08e Merge branch 'feat/nv21' into feat/implement-SyntheticPoRep 2023-09-08 16:41:39 +02:00
Aayush Rajasekaran
d71d647aaf
Merge pull request #11100 from filecoin-project/traceapi
Add new tracing API
2023-08-30 11:34:06 -04:00
Łukasz Magiera
4ee20965fa chore: chain/actors: Use type proxies instead of versioned GST imports 2023-08-29 15:28:16 +02:00
Fridrik Asmundsson
0096d521c3 fix decoding toplevel output in trace_replayBlockTransactions 2023-08-29 12:27:08 +00:00
Fridrik Asmundsson
13e1b4b3df Added todo to support native actors calling another when created 2023-08-29 10:38:21 +00:00
Rod Vagg
b6fe914748
fix(client): single-root error message 2023-08-29 14:46:39 +10:00
Fridrik Asmundsson
930e9b957c fix lint 2023-08-28 18:47:45 +00:00
Fridrik Asmundsson
ed407689e6 Parse input/output for delegate call + other smaller things 2023-08-28 17:48:22 +00:00
Fridrik Asmundsson
029a4a72b8 Address most recent comments 2023-08-28 17:48:22 +00:00
Fridrik Asmundsson
10a5480895 Decode output using top level trace 2023-08-28 17:48:22 +00:00
Fridrik Asmundsson
ee3cdf0e97 Fix use filecoin addr + other small refactor
After changing in prev commit to use to ethereum addresses the
comparison does not make sense against builtin actors. This
fixes that by storing also the filecoin addresses in each trace

Also renamed filecoin related fields to Filecoin prefix.

Also remove requirement call to InvokeContract needed to come
from a evm actor
2023-08-28 17:48:22 +00:00
Fridrik Asmundsson
cf255127a4 Decode eth param/return values and change them to ethbytes type 2023-08-28 17:48:22 +00:00
Fridrik Asmundsson
cb5e6e0cd1 The From/To address should be in eth format 2023-08-28 17:48:22 +00:00
Fridrik Asmundsson
8d8891a431 Moved tracing types to ethtypes to address circular dependencies 2023-08-28 17:48:22 +00:00