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

Feat/transport code #5722

Merged
merged 24 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
01e706e
chore: update test-vectors
simlecode Feb 13, 2023
d768042
fix: null rounds: pass correct timestamp to the FVM
simlecode Feb 13, 2023
6af4466
feat: eth: harden event processing
simlecode Feb 13, 2023
37bbda0
fix: gas: correct the message inclusion cost in nv18
simlecode Feb 13, 2023
7aa6748
chore: updates butterflynet reset artifacts
simlecode Feb 13, 2023
180ddf2
fix: eth: correctly handle ethGetCode ege-cases
simlecode Feb 14, 2023
efce929
refactor: callGas & callWithGas
simlecode Feb 14, 2023
b28e621
fix: eth: correctly convert filecoin message <-> eth txn
simlecode Feb 14, 2023
14cb69e
feat: support passing uint64 in JSON-RPC arguments for EthUint64
simlecode Feb 14, 2023
e4b5719
fix: populate reward in eth_feeHistory
simlecode Feb 14, 2023
346d65f
fix: check message validity before invoking vm
simlecode Feb 14, 2023
c4317f6
chore: update ffi
simlecode Feb 14, 2023
33530d2
chore: fix setup system actor
simlecode Feb 14, 2023
e0472b7
chore: update deps
simlecode Feb 14, 2023
92e56fe
chore: add comment
simlecode Feb 15, 2023
d2ec7d0
chore: make bundle-gen
simlecode Feb 15, 2023
b7c43ab
revert: check message validity before invoking vm
simlecode Feb 15, 2023
9572491
fix: copy the message before modifying it
simlecode Feb 15, 2023
bf522f8
feat: ethrpc: Support newPendingTransactions in eth_subscribe
simlecode Feb 15, 2023
d23c518
chore: update go-state-types
simlecode Feb 15, 2023
b62c663
chore: remove unused code
simlecode Feb 15, 2023
a0f2555
chore: update butterfly asset
simlecode Feb 15, 2023
1dbca6d
chore: update calib hygge epoch
simlecode Feb 15, 2023
a3cf5f5
chore: fix test
simlecode Feb 15, 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
2 changes: 1 addition & 1 deletion app/submodule/chain/chain_submodule.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func NewChainSubmodule(ctx context.Context,
}
faultChecker := consensusfault.NewFaultChecker(chainStore, fork)
syscalls := vmsupport.NewSyscalls(faultChecker, config.Verifier())
processor := consensus.NewDefaultProcessor(syscalls, circulatiingSupplyCalculator)
processor := consensus.NewDefaultProcessor(syscalls, circulatiingSupplyCalculator, chainStore, config.Repo().Config().NetworkParams)

waiter := chain.NewWaiter(chainStore, messageStore, config.Repo().Datastore(), cbor.NewCborStore(config.Repo().Datastore()))

Expand Down
25 changes: 12 additions & 13 deletions app/submodule/chain/chaininfo_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (

"github.com/filecoin-project/venus/pkg/chain"
"github.com/filecoin-project/venus/pkg/constants"
"github.com/filecoin-project/venus/pkg/fork"
"github.com/filecoin-project/venus/pkg/statemanger"
"github.com/filecoin-project/venus/venus-shared/actors"
v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1"
Expand Down Expand Up @@ -769,25 +770,23 @@ func (cia *chainInfoAPI) StateActorManifestCID(ctx context.Context, nv network.V
// message is not applied on-top-of the messages in the passed-in
// tipset.
func (cia *chainInfoAPI) StateCall(ctx context.Context, msg *types.Message, tsk types.TipSetKey) (*types.InvocResult, error) {
start := time.Now()
ts, err := cia.chain.ChainReader.GetTipSet(ctx, tsk)
if err != nil {
return nil, fmt.Errorf("loading tipset %s: %v", tsk, err)
}
ret, err := cia.chain.Stmgr.Call(ctx, msg, ts)
if err != nil {
return nil, err
var res *types.InvocResult
for {
res, err = cia.chain.Stmgr.Call(ctx, msg, ts)
if err != fork.ErrExpensiveFork {
break
}
ts, err = cia.chain.ChainReader.GetTipSet(ctx, ts.Parents())
if err != nil {
return nil, fmt.Errorf("getting parent tipset: %w", err)
}
}
duration := time.Since(start)

mcid := msg.Cid()
return &types.InvocResult{
MsgCid: mcid,
Msg: msg,
MsgRct: &ret.Receipt,
ExecutionTrace: types.ExecutionTrace{},
Duration: duration,
}, nil
return res, nil
}

// StateReplay replays a given message, assuming it was included in a block in the specified tipset.
Expand Down
1 change: 1 addition & 0 deletions app/submodule/chain/miner_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (msa *minerStateAPI) StateSectorPreCommitInfo(ctx context.Context, maddr ad
// StateSectorGetInfo returns the on-chain info for the specified miner's sector. Returns null in case the sector info isn't found
// NOTE: returned info.Expiration may not be accurate in some cases, use StateSectorExpiration to get accurate
// expiration epoch
// return nil if sector not found
func (msa *minerStateAPI) StateSectorGetInfo(ctx context.Context, maddr address.Address, n abi.SectorNumber, tsk types.TipSetKey) (*types.SectorOnChainInfo, error) {
_, view, err := msa.Stmgr.ParentStateViewTsk(ctx, tsk)
if err != nil {
Expand Down
3 changes: 2 additions & 1 deletion app/submodule/eth/dummy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

"github.com/ipfs/go-cid"

"github.com/filecoin-project/go-jsonrpc"
v1 "github.com/filecoin-project/venus/venus-shared/api/chain/v1"
"github.com/filecoin-project/venus/venus-shared/types"
)
Expand Down Expand Up @@ -78,7 +79,7 @@ func (e *ethAPIDummy) EthGetBalance(ctx context.Context, address types.EthAddres
return types.EthBigIntZero, ErrModuleDisabled
}

func (e *ethAPIDummy) EthFeeHistory(ctx context.Context, blkCount types.EthUint64, newestBlk string, rewardPercentiles []float64) (types.EthFeeHistory, error) {
func (e *ethAPIDummy) EthFeeHistory(ctx context.Context, p jsonrpc.RawParams) (types.EthFeeHistory, error) {
return types.EthFeeHistory{}, ErrModuleDisabled
}

Expand Down
Loading