Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: resolve confict #10009

Merged
merged 30 commits into from
Jan 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a8b406e
Update svg-file
rjan90 Dec 15, 2022
87e384e
Update svg-image
rjan90 Dec 15, 2022
bd28a4b
Add snap-sector types
rjan90 Dec 15, 2022
6ae7cda
call Stream.CloseWrite right after writing
hanabi1224 Dec 16, 2022
28b4ebd
chore: VM: don't export Extern::VerifyBlockSig
arajasek Dec 16, 2022
cfb4e62
Revert "_build_ Set noexecstack on snapcraft builds"
ianconsolata Dec 19, 2022
0f9d198
add renew max-sectors flag
beck-8 Dec 25, 2022
c6f6994
fix: bench: remove unused env
rjan90 Jan 2, 2023
83554af
Merge remote-tracking branch 'origin/master' into close-write
hanabi1224 Jan 2, 2023
19a88e2
Merge pull request #9912 from filecoin-project/revert-9868-id/fix-sna…
geoff-vball Jan 3, 2023
bc6afa9
Merge pull request #9884 from filecoin-project/fix/update-sealer-readme
geoff-vball Jan 3, 2023
e8aa95c
Merge pull request #9956 from filecoin-project/fix/remove-unused-env
geoff-vball Jan 3, 2023
d857057
Merge pull request #9902 from filecoin-project/asr/restrict-verifblock
magik6k Jan 4, 2023
4f9119f
add check GetAddressedSectorsMax
beck-8 Jan 4, 2023
f3b5c76
make docsgen-cli
beck-8 Jan 4, 2023
6b14b05
fix: error checks
hanabi1224 Jan 4, 2023
f4b4a63
Merge remote-tracking branch 'origin/master' into close-write
hanabi1224 Jan 4, 2023
273184b
Merge pull request #9941 from beck-8/feat/add_renew_max_sectors
magik6k Jan 4, 2023
472eaaa
Merge pull request #9892 from hanabi1224/close-write
magik6k Jan 4, 2023
920d0c9
feat: ci: show gen diff more clearly in gen checks
magik6k Jan 4, 2023
0881a01
make gen
magik6k Jan 4, 2023
3de0063
This stat-set does not belong in core lotus
ribasushi Jan 4, 2023
37752d1
Merge pull request #9962 from filecoin-project/feat/ci-gen-diff
magik6k Jan 5, 2023
048ccc7
Merge pull request #9964 from ribasushi/chore/remove_obsolete_ribastat
magik6k Jan 5, 2023
cdf3812
NV18: Filecoin EVM runtime + Actor Events + EthAccount + EAM + f4 add…
raulk Jan 13, 2023
e25728c
remove leftover hack.
raulk Jan 13, 2023
35a37ba
feat: more ethaccount abstraction tests
Jan 2, 2023
2de9c43
Merge pull request #9957 from filecoin-project/asr/ethaccount-tests
arajasek Jan 13, 2023
0731fe2
Merge pull request #10004 from filecoin-project/raulk/remove-hack
jennijuju Jan 14, 2023
427fbdb
Merge branch 'release/v1.20.0' into jen/resolveconflict
jennijuju Jan 14, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,9 @@ jobs:
- run: go install golang.org/x/tools/cmd/goimports
- run: go install github.com/hannahhoward/cbor-gen-for
- run: make gen
- run: git --no-pager diff
- run: git --no-pager diff --quiet
- run: git --no-pager diff && git --no-pager diff --quiet
- run: make docsgen-cli
- run: git --no-pager diff
- run: git --no-pager diff --quiet
- run: git --no-pager diff && git --no-pager diff --quiet

docs-check:
executor: golang
Expand All @@ -412,11 +410,7 @@ jobs:
- run: zcat build/openrpc/full.json.gz | jq > ../post-openrpc-full
- run: zcat build/openrpc/miner.json.gz | jq > ../post-openrpc-miner
- run: zcat build/openrpc/worker.json.gz | jq > ../post-openrpc-worker
- run: git --no-pager diff
- run: diff ../pre-openrpc-full ../post-openrpc-full
- run: diff ../pre-openrpc-miner ../post-openrpc-miner
- run: diff ../pre-openrpc-worker ../post-openrpc-worker
- run: git --no-pager diff --quiet
- run: diff ../pre-openrpc-full ../post-openrpc-full && diff ../pre-openrpc-miner ../post-openrpc-miner && diff ../pre-openrpc-worker ../post-openrpc-worker && git --no-pager diff && git --no-pager diff --quiet

lint: &lint
description: |
Expand Down
12 changes: 3 additions & 9 deletions .circleci/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,9 @@ jobs:
- run: go install golang.org/x/tools/cmd/goimports
- run: go install github.com/hannahhoward/cbor-gen-for
- run: make gen
- run: git --no-pager diff
- run: git --no-pager diff --quiet
- run: git --no-pager diff && git --no-pager diff --quiet
- run: make docsgen-cli
- run: git --no-pager diff
- run: git --no-pager diff --quiet
- run: git --no-pager diff && git --no-pager diff --quiet

docs-check:
executor: golang
Expand All @@ -412,11 +410,7 @@ jobs:
- run: zcat build/openrpc/full.json.gz | jq > ../post-openrpc-full
- run: zcat build/openrpc/miner.json.gz | jq > ../post-openrpc-miner
- run: zcat build/openrpc/worker.json.gz | jq > ../post-openrpc-worker
- run: git --no-pager diff
- run: diff ../pre-openrpc-full ../post-openrpc-full
- run: diff ../pre-openrpc-miner ../post-openrpc-miner
- run: diff ../pre-openrpc-worker ../post-openrpc-worker
- run: git --no-pager diff --quiet
- run: diff ../pre-openrpc-full ../post-openrpc-full && diff ../pre-openrpc-miner ../post-openrpc-miner && diff ../pre-openrpc-worker ../post-openrpc-worker && git --no-pager diff && git --no-pager diff --quiet

lint: &lint
description: |
Expand Down
3 changes: 3 additions & 0 deletions chain/exchange/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,9 @@ func (c *client) sendRequestToPeer(ctx context.Context, peer peer.ID, req *Reque
}
_ = stream.SetWriteDeadline(time.Time{}) // clear deadline // FIXME: Needs
// its own API (https://github.com/libp2p/go-libp2p/core/issues/162).
if err := stream.CloseWrite(); err != nil {
log.Warnw("CloseWrite err", "error", err)
}

// Read response.
var res Response
Expand Down
10 changes: 0 additions & 10 deletions chain/stmgr/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -226,16 +226,6 @@ func (sm *StateManager) callInternal(ctx context.Context, msg *types.Message, pr
Data: make([]byte, 65),
},
}
default:
// XXX: Hack to make sending from f099 (and others) "just work".
// REMOVE ME.
msgApply = &types.SignedMessage{
Message: *msg,
Signature: crypto.Signature{
Type: crypto.SigTypeSecp256k1,
Data: make([]byte, 65),
},
}
}

ret, err = vmi.ApplyMessage(ctx, msgApply)
Expand Down
6 changes: 3 additions & 3 deletions chain/vm/fvm.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,14 @@ func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte
// check blocks are properly signed by their respective miner
// note we do not need to check extra's: it is a parent to block b
// which itself is signed, so it was willingly included by the miner
gasA, sigErr := x.VerifyBlockSig(ctx, &blockA)
gasA, sigErr := x.verifyBlockSig(ctx, &blockA)
totalGas += gasA
if sigErr != nil {
log.Info("invalid consensus fault: cannot verify first block sig: %w", sigErr)
return ret, totalGas
}

gas2, sigErr := x.VerifyBlockSig(ctx, &blockB)
gas2, sigErr := x.verifyBlockSig(ctx, &blockB)
totalGas += gas2
if sigErr != nil {
log.Info("invalid consensus fault: cannot verify second block sig: %w", sigErr)
Expand All @@ -226,7 +226,7 @@ func (x *FvmExtern) VerifyConsensusFault(ctx context.Context, a, b, extra []byte
return ret, totalGas
}

func (x *FvmExtern) VerifyBlockSig(ctx context.Context, blk *types.BlockHeader) (int64, error) {
func (x *FvmExtern) verifyBlockSig(ctx context.Context, blk *types.BlockHeader) (int64, error) {
waddr, gasUsed, err := x.workerKeyAtLookback(ctx, blk.Miner, blk.Height)
if err != nil {
return gasUsed, err
Expand Down
2 changes: 1 addition & 1 deletion cmd/lotus-bench/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ var sealBenchCmd = &cli.Command{
}

bo.EnvVar = make(map[string]string)
for _, envKey := range []string{"BELLMAN_NO_GPU", "FIL_PROOFS_MAXIMIZE_CACHING", "FIL_PROOFS_USE_GPU_COLUMN_BUILDER",
for _, envKey := range []string{"BELLMAN_NO_GPU", "FIL_PROOFS_USE_GPU_COLUMN_BUILDER",
"FIL_PROOFS_USE_GPU_TREE_BUILDER", "FIL_PROOFS_USE_MULTICORE_SDR", "BELLMAN_CUSTOM_GPU"} {
envValue, found := os.LookupEnv(envKey)
if found {
Expand Down
16 changes: 15 additions & 1 deletion cmd/lotus-miner/sectors.go
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,10 @@ var sectorsRenewCmd = &cli.Command{
Usage: "use up to this amount of FIL for one message. pass this flag to avoid message congestion.",
Value: "0",
},
&cli.Int64Flag{
Name: "max-sectors",
Usage: "the maximum number of sectors contained in each message message",
},
&cli.BoolFlag{
Name: "really-do-it",
Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters",
Expand Down Expand Up @@ -1020,10 +1024,20 @@ var sectorsRenewCmd = &cli.Command{
for l, exts := range extensions {
for newExp, numbers := range exts {
scount += len(numbers)
addrSectors, err := policy.GetAddressedSectorsMax(nv)
var addrSectors int
sectorsMax, err := policy.GetAddressedSectorsMax(nv)
if err != nil {
return err
}
if cctx.Int("max-sectors") == 0 {
addrSectors = sectorsMax
} else {
addrSectors = cctx.Int("max-sectors")
if addrSectors > sectorsMax {
return xerrors.Errorf("the specified max-sectors exceeds the maximum limit")
}
}

declMax, err := policy.GetDeclarationsMax(nv)
if err != nil {
return err
Expand Down
1 change: 0 additions & 1 deletion cmd/lotus-shed/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func main() {
exportChainCmd,
exportCarCmd,
consensusCmd,
storageStatsCmd,
syncCmd,
stateTreePruneCmd,
datastoreCmd,
Expand Down
199 changes: 0 additions & 199 deletions cmd/lotus-shed/storage-stats.go

This file was deleted.

1 change: 1 addition & 0 deletions documentation/en/cli-lotus-miner.md
Original file line number Diff line number Diff line change
Expand Up @@ -1897,6 +1897,7 @@ OPTIONS:
--extension value try to extend selected sectors by this number of epochs, defaults to 540 days (default: 1555200)
--from value only consider sectors whose current expiration epoch is in the range of [from, to], <from> defaults to: now + 120 (1 hour) (default: 0)
--max-fee value use up to this amount of FIL for one message. pass this flag to avoid message congestion. (default: "0")
--max-sectors value the maximum number of sectors contained in each message message (default: 0)
--new-expiration value try to extend selected sectors to this epoch, ignoring extension (default: 0)
--only-cc only extend CC sectors (useful for making sector ready for snap upgrade) (default: false)
--really-do-it pass this flag to really renew sectors, otherwise will only print out json representation of parameters (default: false)
Expand Down
1 change: 0 additions & 1 deletion node/builder_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ func ConfigFullNode(c interface{}) Option {

// Actor event filtering support
Override(new(events.EventAPI), From(new(modules.EventAPI))),

// in lite-mode Eth event api is provided by gateway
ApplyIf(isFullNode, Override(new(full.EthEventAPI), modules.EthEventAPI(cfg.ActorEvent))),
)
Expand Down
3 changes: 3 additions & 0 deletions node/hello/hello.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ func (hs *Service) SayHello(ctx context.Context, pid peer.ID) error {
if err := cborutil.WriteCborRPC(s, hmsg); err != nil {
return xerrors.Errorf("writing rpc to peer: %w", err)
}
if err := s.CloseWrite(); err != nil {
log.Warnw("CloseWrite err", "error", err)
}

go func() {
defer s.Close() //nolint:errcheck
Expand Down
Loading