Commit Graph

3311 Commits

Author SHA1 Message Date
Łukasz Magiera
e425322c2b misc: Drop the raft-cluster experiment 2023-11-29 17:28:46 +01: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
Steven Allen
afa95681af
fix: chain: make failure to load the chain state fatal (#11426)
Otherwise, we get strange panics later.
2023-11-29 16:01:26 +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
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
Ł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
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
Aayush Rajasekaran
77b6b7ef10
feat: chain: light-weight patch to fix calibrationnet (#11363)
* refactor: make GetEmbeddedBuiltinActorsBundle take network bundle name

* update calibnet actor bundle to v12.0.0-rc.2, but include v12.0.0-rc.1 as calibrationnet-buggy.car

* wip: calibnet unbork migration

* calibnet: add buggy miner actor CID to actorMeta

* fix incorrect buggy calibnet manifest

* make UpgradeWatermelonFixHeight a build param

* calibnet patch: check whether network is calibration from init actor state

* add sanity checks to the v12 calibnet patch upgrade

* address review
2023-10-31 18:29:09 -04:00
Phi
7b473f60ae Handle errors from Close() in CheckUDPBufferSize
Added error handling for the Close() method calls in the CheckUDPBufferSize function to satisfy linting rules and improve error logging.
2023-10-30 09:59:59 +00:00
Phi
a6ae497c02 Check UDP-buffer-size
Raise alert if UDP-buffer size is not high enough
2023-10-30 09:36:15 +00: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
Aayush
5e76b05b17 Merge branch 'feat/nv21' into asr/merge-feat-nv21 2023-10-16 11:13:33 -04:00
Aayush Rajasekaran
a7f4976ab1
Merge pull request #11314 from filecoin-project/fix/sector-commitment-comment
fix: docs: Update SectorLifetime to be in line with FIP-0052
2023-10-11 15:50:10 -04:00
Aayush
2a644e2c04 feat: limit PoSted partitions to 3 2023-10-11 12:41:55 -04:00
Phi
db96bc0143 Update comment
Make clear that 1278 days are applicable in nv21 not before.
2023-10-11 16:30:30 +01:00
Phi
ce27d5fcf2 fix: config: update sector lifetime comment
Update SectorLifetime duration comment to be in line with FIP-0052: https://fips.filecoin.io/FIPS/fip-0052.html
2023-10-09 11:17:03 +01:00
Łukasz Magiera
1927b26abf fee config: Default MaximizeWindowPoStFeeCap to true 2023-10-03 11:53:26 +02:00
Łukasz Magiera
444e75ef77 feat: mpool/wdpost: Maximize feecap config 2023-10-03 11:32:49 +02:00
Phi
f0fce8f4a5 Remove sentence
Remove sentence about additional computation costs
2023-10-02 13:19:13 +01:00
Phi
3d8324d0f8 Remove precomputing line
Remove precomputing line
2023-09-27 08:59:40 +01:00
Phi
e7b0fb3de3 Update todo in config
Updates the TODO in the synthetic config.
2023-09-26 08:22:25 +02:00
Steven Allen
c6debaadf0 make gen 2023-09-23 17:54:44 -04:00
Steven Allen
2fa5422581 fix: use VerifyDealForActivation in StateComputeCID
Unfortunately, ComputeDataCommitement was deprecated.
2023-09-23 17:54:39 -04:00
Aayush
04ebd5177c refactor: GetMaxSectorExpirationExtension depends on network version 2023-09-23 14:09:25 -04:00
Łukasz Magiera
a8d693a2c0
Merge pull request #11274 from filecoin-project/fix/update-splitstore-config-comments
fix: config: Update ColdStoreType comments
2023-09-22 15:36:54 +02:00
Phi
e8570bd69c Remove double default
Remove double default
2023-09-22 15:24:55 +02: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
Phi
8b77839d38 Make gen
Make gen
2023-09-19 13:21:07 +02:00
Phi
e5f32f288d Update ColdStoreType comments
Update comments to say that "discard" is the default mode in SplitStore.
2023-09-19 12:32:41 +02:00
Aayush Rajasekaran
35ceb02c50
Merge pull request #11261 from filecoin-project/eth_filert_flake_debug
eth_filter flake debug
2023-09-18 11:57:12 -04: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
Aayush
89dede32ac drop unused imports 2023-09-11 13:50:55 -04:00
Steven Allen
cfaeb2718f fix: networking: avoid dialing when trying to handshake peers
Also, avoid handshaking with peers that don't support the handshake
protocol.
2023-09-08 14:52:14 -07: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
Mikers
5e5a81bf23
add go linter - "unused" (#11235)
* add go linter - "unused"

* use _ to name unused but needed padding variable

* remove unused code

* add queue test to appease unused linter

* remove unused code in test

* remove unused func

* remove unused struct identified by linter

* remove unused variable

* remove unused code

* remove unused file

* remove unused struct

* remove unused function

* remove unused observe peers function in raft

* remove unused declareFaults function

* annotate nolint:unused on needed methods
2023-09-05 12:19:43 -10: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
a9396624a7
Merge pull request #11215 from filecoin-project/backport/nv21/feat/act-precommv2
Backport: feat: sealing: Switch to calling PreCommitSectorBatch2
2023-08-29 16:06:27 +02: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
Łukasz Magiera
ecb6deea09 sealing pipeline: Drop legacy single-pc1 submit path 2023-08-29 13:46:29 +02:00