Commit Graph

4286 Commits

Author SHA1 Message Date
Łukasz Magiera
2f19a5f66d gen, fix build with new state-types 2023-07-13 15:48:19 +02:00
Andrew Jackson (Ajax)
1a799aec37 fixes 2023-07-13 15:48:08 +02:00
Andrew Jackson (Ajax)
08038540e4 Impl synthPoRep 2023-07-13 15:47:59 +02:00
Andrew Jackson (Ajax)
b43665a3c1 synthPoRep in PreferredSeal..() 2023-07-13 15:47:58 +02:00
Andrew Jackson (Ajax)
1db45f46ae synthetic-porep subpackages 2023-07-13 15:47:20 +02:00
Phi
c7b9633160 feat: introduce local nv21 skeleton
Introduce nv21 skeleton for local testing:

- Use local go-state-types with actor_version_checklist changes: https://github.com/filecoin-project/go-state-types/blob/master/actors_version_checklist.md
- Imports mock v12-actors bundle
- Define upgrade heights
- Generate adapters
- Add upgrade schedule and migration
- Add actorstype to the NewActorRegistry in /chain/consensus/computestate.go
- Add upgrade field to api/types.go/ForkUpgradeParams
- Add upgrade to node/impl/full/state.go
- Add network version to chain/state/statetree.go
- make jen
- make docsgen-cli
2023-07-13 15:47:18 +02:00
Fridrik Asmundsson
655ea1e0b5 Add tmp indices to events table while performing migration to V2
After the migration we also perform db administration on the
events DB to reduce its file size on disk.

(cherry picked from commit 0d7621be56)
2023-07-11 10:25:32 -04:00
Fridrik Asmundsson
b80c0828b9 feat: Make sure we dont store duplidate actor events caused by reorgs 2023-06-30 11:20:57 +00:00
Friðrik Ásmundsson
a2431ff70a
Merge pull request #10815 from filecoin-project/10814-eip-1891
Add EIP-1898 support needed for The Graph compatibility
2023-06-23 08:29:45 +00:00
Fridrik Asmundsson
dda2d7e023 Refactor EthBlockNumberOrHash and remove the number field 2023-06-22 17:18:50 +00:00
Fridrik Asmundsson
f358160cd5 Add EIP-1898 support needed for The Graph compatibility
Fixes: #10814

This PR updates the following RPC methods according to EIP-1898
specs.

The following RPC methods are affected:

- eth_getBalance
- eth_getStorageAt
- eth_getTransactionCount
- eth_getCode
- eth_call

Note that eth_getBlockByNumber was not included in this list in
the spec although it seems it should be affected also?

Currently these methods all accept a blkParam string which can be
one of "latest", "earliest", "pending", or a block number (decimal
or hex). The spec enables caller to additionally specify a json
hash which can include the following fields:

- blockNumber EthUint64: A block number (decimal or hex) which is
  similar to the original use of the blkParam string
- blockHash EthHash: The block hash
- requireCanonical bool) If true we should make sure the block is
  in the canonical chain

Since the blkParam needs to support both being a number/string and
a json hash then this to properly work we need to introduce a new
struct with pointer fields to check if they exist. This is done
in the EthBlockParamByNumberOrHash struct which first tries to
unmarshal as a json hash (according to eip-1898) and then fallback
to unmarshal as string/number.
2023-06-20 09:38:00 +00:00
Jorropo
6c01310728
chore: migrate to boxo
This migrates everything except the `go-car` librairy: https://github.com/ipfs/boxo/issues/218#issuecomment-1529922103

I didn't migrated everything in the previous release because all the boxo code wasn't compatible with the go-ipld-prime one due to a an in flight (/ aftermath) revert of github.com/ipfs/go-block-format. go-block-format has been unmigrated since slight bellow absolutely everything depends on it that would have required everything to be moved on boxo or everything to optin into using boxo which were all deal breakers for different groups.

This worked fine because lotus's codebase could live hapely on the first multirepo setup however boost is now trying to use boxo's code with lotus's (still on multirepo) setup: https://filecoinproject.slack.com/archives/C03AQ3QAUG1/p1685022344779649

The alternative would be for boost to write shim types which just forward calls and return with the different interface definitions.

Btw why is that an issue in the first place is because unlike what go's duck typing model suggest interfaces are not transparent https://github.com/golang/go/issues/58112, interfaces are strongly typed but they have implicit narrowing. The issue is if you return an interface from an interface Go does not have a function definition to insert the implicit conversion thus instead the type checker complains you are not returning the right type.

Stubbing types were reverted https://github.com/ipfs/boxo/issues/218#issuecomment-1478650351

Last time I only migrated `go-bitswap` to `boxo/bitswap` because of the security issues and because we never had the interface return an interface problem (we had concrete wrappers where the implicit conversion took place).
2023-06-19 14:45:05 -07:00
Aayush Rajasekaran
4ca5b0ede9
Merge pull request #10973 from filecoin-project/asr/fix-existing-nonce
fix: pubsub: do not treat ErrExistingNonce as Reject
2023-06-13 09:25:11 -05:00
Aayush
2a6d0e5f6e fix: pubsub: do not treat ErrExistingNonce as Reject 2023-06-13 10:13:24 -04:00
mx
48912e8f09 fix: chain error 2023-06-13 09:46:36 +08:00
mx
36b5f485cd Merge branch 'slashfilter' of https://github.com/storswiftlabs/lotus into slashfilter 2023-06-09 10:18:45 +08:00
mx
2fca475dd4 fix: supply extra params for ReportConsensusFaultParams 2023-06-09 10:15:14 +08:00
swift-mx
e3c796c848
Merge branch 'master' into slashfilter 2023-06-08 18:56:49 +08:00
Fridrik Asmundsson
9240776237 fix: improve perf of msgindex backfill 2023-06-01 14:36:05 +00:00
swift-mx
2fd8602c5a
Merge branch 'master' into slashfilter 2023-05-31 10:02:01 +08:00
Łukasz Magiera
6cc506f5cf
Merge pull request #10923 from filecoin-project/feat/sectors-upgradebounds-cli
feat: miner cli: sectors list upgrade-bounds tool
2023-05-30 20:34:38 +02:00
swift-mx
196cd0b739
fix: add more log for error 2023-05-31 00:06:50 +08:00
Łukasz Magiera
87ae60a2bc
Merge pull request #10650 from filecoin-project/vyzo/test/mpool-select
Add timing test for mpool select with a large mpool dump
2023-05-30 17:00:06 +02:00
Łukasz Magiera
183e35f7b7
Merge pull request #10925 from filecoin-project/asr/drop-orange-check
feat: slashfilter: drop outdated near-upgrade check
2023-05-30 16:56:43 +02:00
Aayush Rajasekaran
3d061ba0ae
Merge pull request #10649 from filecoin-project/asr/test-gas-reward
test: messagepool: gas rewards are negative if GasFeeCap too low
2023-05-30 10:25:35 -04:00
mx
425661772d style:Refactoring slashfilter 2023-05-30 14:33:35 +08:00
Aayush Rajasekaran
b76b5ef4b7
Merge pull request #10863 from AnomalRoil/fix/fuzz/48208
fix: types: error out on decoding BlockMsg with extraneous data
2023-05-29 16:58:41 -04:00
Aayush Rajasekaran
867a7b1c01
Merge pull request #10628 from filecoin-project/asr/exec-trace-compute
fix: include extra messages in ComputeState InvocResult output
2023-05-29 12:56:43 -04:00
Aayush
10ed18ba12 test: messagepool: gas rewards are negative if GasFeeCap too low 2023-05-29 12:54:04 -04:00
Aayush Rajasekaran
0ec2acbf20
Merge pull request #10652 from filecoin-project/asr/mpool-fee-too-low
feat: pubsub: treat ErrGasFeeCapTooLow as ignore, not reject
2023-05-29 12:53:38 -04:00
Aayush
228b306370 feat: slashfilter: drop outdated near-upgrade check 2023-05-29 11:12:19 -04:00
Łukasz Magiera
14f9770859 feat: miner cli: sectors list upgrade-bounds tool 2023-05-26 12:29:36 +02:00
Łukasz Magiera
8c8e287be0
Merge pull request #10896 from filecoin-project/feat/chainindex-sharded-mutex
feat: chainstore: sharded mutex for filling chain height index
2023-05-24 12:49:16 +02:00
simlecode
6ec413b7ad fix: not call RUnlock 2023-05-23 17:43:39 +08:00
Yolan Romailler
00e34436b3
Addressing code review comments
Signed-off-by: Yolan Romailler <AnomalRoil@users.noreply.github.com>
2023-05-22 21:47:55 +02:00
Jakub Sztandera
cad743ec54
Appease the linter
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2023-05-19 20:02:47 +02:00
Jakub Sztandera
dfa7fc7723
feat: chainstore: sharded mutex for filling chain height index
This PR introduces as sharded mutex within the ChainIndex#GetTipsetByHeight.
It also replaces a go map with xsync.Map which doesn't require locking.

The lock is taken when it appears that ChainIndex filling work should be
started. After claiming the lock, the status of the cache is rechecked,
if the entry is still missing, the fillCache is started.

Thanks to @snissn and @arajasek for debugging and taking initial stabs at this.

Supersedes #10866 and 10885

Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
2023-05-19 19:49:22 +02:00
gammazero
f35fa5757a Replace use of storetheindex with go-libipni 2023-05-17 11:41:00 -07:00
Shrenuj Bansal
b0d1385273 Check if epoch is negative in GetTipsetByHeight 2023-05-16 21:19:03 -04:00
Yolan Romailler
0d7d906abf
Adding extra data check on DecodeBlockMsg
fix: types: error out on decoding BlockMsg with extraneous data
Fixes OSS-fuzz issue 48208: lotus:fuzz_block_msg

Signed-off-by: Yolan Romailler <anomalroil@users.noreply.github.com>
2023-05-12 21:32:44 +02:00
Friðrik Ásmundsson
b4ea0db04f
Merge pull request #10719 from filecoin-project/10622-add-eth-syncing
feat: Add eth_syncing RPC method
2023-05-10 16:21:11 -04:00
Fridrik Asmundsson
2bc205ed62 feat: Add eth_syncing RPC method
This commit adds eth_syncing RPC method which returns an object
with data about the sync status or false.
2023-05-10 16:08:18 -04:00
Aayush
fb228ebbff feat: mempool: reintroduce ForEachPendingMessage 2023-05-10 14:19:33 -04:00
Friðrik Ásmundsson
ceb3f1e41e
Validate that FromBlock/ToBlock epoch is indeed a hex value (#10780)
* Validate that FromBlock/ToBlock epoch is indeed a hex value

* Adding tests
2023-05-09 17:17:23 -04:00
Aayush
596b01fba2 feat: chainstore: exit early in MaybeTakeHeavierTipset 2023-05-05 13:56:48 -04:00
Mike Seiler
9c05a1f734 chain errors using xerrors.Errorf 2023-05-04 23:50:07 -10:00
Friðrik Ásmundsson
e6c8072f50
Merge pull request #10827 from filecoin-project/10585-address-review-comments
10585 address review comments
2023-05-04 18:32:04 +00:00
Fridrik Asmundsson
4e8ee737fc Address review comments 2023-05-04 17:10:26 +00:00
Aayush
b45409262f feat: deflake msgindex_test.go 2023-05-04 12:04:28 -04:00
Friðrik Ásmundsson
dec3af7d7f
Merge pull request #10585 from filecoin-project/10584-make-execution-cache-size-configurable
feat: Make execution trace configurable via env variable
2023-05-04 14:07:35 +00:00