From c4d0d590636a5823ef47a914a28b6617b902b8dd Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:03:01 +0800 Subject: [PATCH 1/3] chore: genarate builtin actors --- venus-devtool/go.mod | 2 +- venus-devtool/go.sum | 4 +-- venus-shared/actors/builtin/builtin.go | 27 ++++++++++++------- .../actors/builtin/builtin.go.template | 18 +++++++++++++ .../compatible-checks/actor-sources.txt | 1 - 5 files changed, 39 insertions(+), 13 deletions(-) diff --git a/venus-devtool/go.mod b/venus-devtool/go.mod index 1a83e3c80e..996d9d3778 100644 --- a/venus-devtool/go.mod +++ b/venus-devtool/go.mod @@ -9,7 +9,7 @@ require ( github.com/filecoin-project/go-fil-markets v1.25.2 github.com/filecoin-project/go-jsonrpc v0.1.9 github.com/filecoin-project/go-state-types v0.10.0-alpha-5 - github.com/filecoin-project/lotus v1.18.2-0.20221215215610-d574eda147ed + github.com/filecoin-project/lotus v1.18.2-0.20221216222459-5f4ccfd79084 github.com/filecoin-project/venus v0.0.0-00010101000000-000000000000 github.com/google/uuid v1.3.0 github.com/ipfs/go-block-format v0.0.3 diff --git a/venus-devtool/go.sum b/venus-devtool/go.sum index dc10d68bcf..cb85106027 100644 --- a/venus-devtool/go.sum +++ b/venus-devtool/go.sum @@ -338,8 +338,8 @@ github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWc github.com/filecoin-project/go-statestore v0.2.0 h1:cRRO0aPLrxKQCZ2UOQbzFGn4WDNdofHZoGPjfNaAo5Q= github.com/filecoin-project/go-statestore v0.2.0/go.mod h1:8sjBYbS35HwPzct7iT4lIXjLlYyPor80aU7t7a/Kspo= github.com/filecoin-project/index-provider v0.9.1 h1:Jnh9dviIHvQxZ2baNoYu3n8z6F9O62ksnVlyREgPyyM= -github.com/filecoin-project/lotus v1.18.2-0.20221215215610-d574eda147ed h1:NiMBCcyejzzcY4qvW/CK9dAlEN5p5qy9/j6573Gi9HI= -github.com/filecoin-project/lotus v1.18.2-0.20221215215610-d574eda147ed/go.mod h1:mYznBAFEEfBGY4c081A0UiyX0GxHn0F9528JJ0r5mVw= +github.com/filecoin-project/lotus v1.18.2-0.20221216222459-5f4ccfd79084 h1:hda9tgw3nIYezGT7PXs6EsiQAcwI4gJmyZ0BWk4A+hk= +github.com/filecoin-project/lotus v1.18.2-0.20221216222459-5f4ccfd79084/go.mod h1:t8BPmtBAmA3srP4xzxq8gH0DKiigloW20KKQwO2PZWk= github.com/filecoin-project/pubsub v1.0.0 h1:ZTmT27U07e54qV1mMiQo4HDr0buo8I1LDHBYLXlsNXM= github.com/filecoin-project/pubsub v1.0.0/go.mod h1:GkpB33CcUtUNrLPhJgfdy4FDx4OMNR9k+46DHx/Lqrg= github.com/filecoin-project/specs-actors v0.9.13/go.mod h1:TS1AW/7LbG+615j4NsjMK1qlpAwaFsG9w0V2tg2gSao= diff --git a/venus-shared/actors/builtin/builtin.go b/venus-shared/actors/builtin/builtin.go index 8d6ef5db39..450f8d78a9 100644 --- a/venus-shared/actors/builtin/builtin.go +++ b/venus-shared/actors/builtin/builtin.go @@ -99,15 +99,6 @@ func ActorNameByCode(c cid.Cid) string { } } -func IsEmbryo(c cid.Cid) bool { - name, _, ok := actors.GetActorMetaByCode(c) - if ok { - return name == "embryo" - } - - return false -} - func IsBuiltinActor(c cid.Cid) bool { _, _, ok := actors.GetActorMetaByCode(c) if ok { @@ -293,6 +284,24 @@ func IsPaymentChannelActor(c cid.Cid) bool { return false } +func IsEmbryoActor(c cid.Cid) bool { + name, _, ok := actors.GetActorMetaByCode(c) + if ok { + return name == "embryo" + } + + return false +} + +func IsEthAccountActor(c cid.Cid) bool { + name, _, ok := actors.GetActorMetaByCode(c) + if ok { + return name == "ethaccount" + } + + return false +} + func makeAddress(addr string) address.Address { ret, err := address.NewFromString(addr) if err != nil { diff --git a/venus-shared/actors/builtin/builtin.go.template b/venus-shared/actors/builtin/builtin.go.template index 1067b10306..eadebcad2b 100644 --- a/venus-shared/actors/builtin/builtin.go.template +++ b/venus-shared/actors/builtin/builtin.go.template @@ -155,6 +155,24 @@ func IsPaymentChannelActor(c cid.Cid) bool { return false } +func IsEmbryoActor(c cid.Cid) bool { + name, _, ok := actors.GetActorMetaByCode(c) + if ok { + return name == "embryo" + } + + return false +} + +func IsEthAccountActor(c cid.Cid) bool { + name, _, ok := actors.GetActorMetaByCode(c) + if ok { + return name == "ethaccount" + } + + return false +} + func makeAddress(addr string) address.Address { ret, err := address.NewFromString(addr) if err != nil { diff --git a/venus-shared/compatible-checks/actor-sources.txt b/venus-shared/compatible-checks/actor-sources.txt index 4a2018bccf..882bd26c07 100644 --- a/venus-shared/compatible-checks/actor-sources.txt +++ b/venus-shared/compatible-checks/actor-sources.txt @@ -35,7 +35,6 @@ SOURCES IN chain/actors: builtin/datacap/util.go builtin/datacap/v10.go builtin/datacap/v9.go - builtin/embryo.go builtin/evm/evm.go builtin/evm/v10.go builtin/init/diff.go From 2dfa395cd4b8ca8551239f181da6164f5ea8bd67 Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:40:52 +0800 Subject: [PATCH 2/3] chore: account abstraction --- pkg/consensus/block_validator.go | 8 ++++---- pkg/messagepool/messagepool.go | 19 +++++++++++++++---- pkg/messagepool/messagepool_test.go | 2 +- pkg/vm/register/default.go | 2 +- venus-shared/types/eth.go | 8 ++++++-- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/pkg/consensus/block_validator.go b/pkg/consensus/block_validator.go index c0cc6ecfe7..5e5343ea2c 100644 --- a/pkg/consensus/block_validator.go +++ b/pkg/consensus/block_validator.go @@ -748,13 +748,13 @@ func (bv *BlockValidator) VerifyWinningPoStProof(ctx context.Context, nv network return nil } -func isValidForSending(act *types.Actor) bool { - if builtin.IsAccountActor(act.Code) { +func IsValidForSending(act *types.Actor) bool { + if builtin.IsAccountActor(act.Code) || builtin.IsEthAccountActor(act.Code) { return true } // HACK: Allow Eth embryos to send messages - if !builtin.IsEmbryo(act.Code) || act.Address == nil || act.Address.Protocol() != address.Delegated { + if !builtin.IsEmbryoActor(act.Code) || act.Address == nil || act.Address.Protocol() != address.Delegated { return false } id, _, err := varint.FromUvarint(act.Address.Payload()) @@ -830,7 +830,7 @@ func (bv *BlockValidator) checkBlockMessages(ctx context.Context, sigValidator * return fmt.Errorf("actor %s not found", sender) } - if isValidForSending(act) { + if IsValidForSending(act) { return errors.New("sender must be an account actor") } nonces[sender] = act.Nonce diff --git a/pkg/messagepool/messagepool.go b/pkg/messagepool/messagepool.go index 97581f08b5..d61e88ed34 100644 --- a/pkg/messagepool/messagepool.go +++ b/pkg/messagepool/messagepool.go @@ -32,6 +32,7 @@ import ( "github.com/filecoin-project/venus/pkg/chain" "github.com/filecoin-project/venus/pkg/config" + "github.com/filecoin-project/venus/pkg/consensus" "github.com/filecoin-project/venus/pkg/constants" crypto2 "github.com/filecoin-project/venus/pkg/crypto" "github.com/filecoin-project/venus/pkg/messagepool/journal" @@ -841,7 +842,7 @@ func sigCacheKey(m *types.SignedMessage) (string, error) { case crypto.SigTypeDelegated: txArgs, err := types.NewEthTxArgsFromMessage(&m.Message) if err != nil { - return "", err + return "", fmt.Errorf("failed to convert to eth tx args: %w", err) } msg, err := txArgs.HashedOriginalRlpMsg() if err != nil { @@ -921,18 +922,28 @@ func (mp *MessagePool) addTS(ctx context.Context, m *types.SignedMessage, curTS mp.lk.Lock() defer mp.lk.Unlock() + senderAct, err := mp.api.GetActorAfter(ctx, m.Message.From, curTS) + if err != nil { + return false, fmt.Errorf("failed to get sender actor: %w", err) + } + + // TODO: I'm not thrilled about depending on filcns here, but I prefer this to duplicating logic + if !consensus.IsValidForSending(senderAct) { + return false, fmt.Errorf("sender actor %s is not a valid top-level sender", m.Message.From) + } + publish, err := mp.verifyMsgBeforeAdd(ctx, m, curTS, local) if err != nil { - return false, err + return false, fmt.Errorf("verify msg failed: %w", err) } if err := mp.checkBalance(ctx, m, curTS); err != nil { - return false, err + return false, fmt.Errorf("failed to check balance: %w", err) } err = mp.addLocked(ctx, m, !local, untrusted) if err != nil { - return false, err + return false, fmt.Errorf("failed to add locked: %w", err) } if local { diff --git a/pkg/messagepool/messagepool_test.go b/pkg/messagepool/messagepool_test.go index d8438d535f..3d1f2a9f75 100644 --- a/pkg/messagepool/messagepool_test.go +++ b/pkg/messagepool/messagepool_test.go @@ -252,7 +252,7 @@ func (tma *testMpoolAPI) GetActorAfter(ctx context.Context, addr address.Address } return &types.Actor{ - Code: builtin2.StorageMarketActorCodeID, + Code: builtin2.AccountActorCodeID, Nonce: nonce, Balance: balance, }, nil diff --git a/pkg/vm/register/default.go b/pkg/vm/register/default.go index f27e2d0c69..307cd60c47 100644 --- a/pkg/vm/register/default.go +++ b/pkg/vm/register/default.go @@ -46,7 +46,7 @@ func GetDefaultActros() *dispatch.CodeLoader { } func DumpActorState(codeLoader *dispatch.CodeLoader, act *types.Actor, b []byte) (interface{}, error) { - if builtin.IsAccountActor(act.Code) || builtin.IsEmbryo(act.Code) { // Account code special case + if builtin.IsAccountActor(act.Code) || builtin.IsEmbryoActor(act.Code) { // Account code special case return nil, nil } diff --git a/venus-shared/types/eth.go b/venus-shared/types/eth.go index 8ab8c4d237..e8b99643be 100644 --- a/venus-shared/types/eth.go +++ b/venus-shared/types/eth.go @@ -291,8 +291,12 @@ func TryEthAddressFromFilecoinAddress(addr address.Address, allowID bool) (EthAd func EthAddressFromFilecoinAddress(addr address.Address) (EthAddress, error) { ethAddr, ok, err := TryEthAddressFromFilecoinAddress(addr, true) - if !ok && err == nil { - err = xerrors.Errorf("failed to convert filecoin address %s to an equivalent eth address", addr) + if err != nil { + return EthAddress{}, fmt.Errorf("failed to try converting filecoin to eth addr: %w", err) + } + + if !ok { + return EthAddress{}, fmt.Errorf("failed to convert filecoin address %s to an equivalent eth address", addr) } return ethAddr, err } From caa7116c4f57a0f88d358e50d19642a2c7fe2dce Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Mon, 19 Dec 2022 17:46:02 +0800 Subject: [PATCH 3/3] chore: fix test & fix lint --- venus-shared/api/chain/v0/method.md | 33 ++++++++++++------- venus-shared/api/chain/v1/method.md | 24 +++++++++----- venus-shared/api/market/client/method.md | 3 +- venus-shared/api/market/method.md | 3 +- venus-shared/api/messager/method.md | 30 +++++++++++------ .../compatible-checks/api-checksum.txt | 16 +++++++-- venus-shared/compatible-checks/api-diff.txt | 11 +++++++ venus-shared/utils/method_map_test.go | 2 +- 8 files changed, 87 insertions(+), 35 deletions(-) diff --git a/venus-shared/api/chain/v0/method.md b/venus-shared/api/chain/v0/method.md index 1f069735d2..77e1d5fd64 100644 --- a/venus-shared/api/chain/v0/method.md +++ b/venus-shared/api/chain/v0/method.md @@ -706,7 +706,8 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } ] ``` @@ -820,7 +821,8 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } ] ``` @@ -1257,7 +1259,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } } ``` @@ -1395,7 +1398,8 @@ Response: "MsgRct": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "GasCost": { "Message": { @@ -1428,7 +1432,8 @@ Response: "MsgRct": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "Error": "string value", "Duration": 60000000000, @@ -1472,7 +1477,8 @@ Response: "MsgRct": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "Error": "string value", "Duration": 60000000000, @@ -1576,7 +1582,8 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } ``` @@ -1633,7 +1640,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ @@ -1672,7 +1680,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ @@ -1754,7 +1763,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ @@ -1794,7 +1804,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ diff --git a/venus-shared/api/chain/v1/method.md b/venus-shared/api/chain/v1/method.md index 363cb19fa5..b1d503e2c1 100644 --- a/venus-shared/api/chain/v1/method.md +++ b/venus-shared/api/chain/v1/method.md @@ -720,7 +720,8 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } ] ``` @@ -786,7 +787,8 @@ Response: { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } ] ``` @@ -1252,7 +1254,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null } } ``` @@ -1390,7 +1393,8 @@ Response: "MsgRct": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "GasCost": { "Message": { @@ -1423,7 +1427,8 @@ Response: "MsgRct": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "Error": "string value", "Duration": 60000000000, @@ -1467,7 +1472,8 @@ Response: "MsgRct": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "Error": "string value", "Duration": 60000000000, @@ -1694,7 +1700,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ @@ -1796,7 +1803,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ diff --git a/venus-shared/api/market/client/method.md b/venus-shared/api/market/client/method.md index df16d9c3b5..82e3552dd6 100644 --- a/venus-shared/api/market/client/method.md +++ b/venus-shared/api/market/client/method.md @@ -1233,7 +1233,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ diff --git a/venus-shared/api/market/method.md b/venus-shared/api/market/method.md index c6d09a64aa..e4bc02a2ed 100644 --- a/venus-shared/api/market/method.md +++ b/venus-shared/api/market/method.md @@ -1895,7 +1895,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "ReturnDec": {}, "TipSet": [ diff --git a/venus-shared/api/messager/method.md b/venus-shared/api/messager/method.md index 5f288a46b4..391cb08ce9 100644 --- a/venus-shared/api/messager/method.md +++ b/venus-shared/api/messager/method.md @@ -194,7 +194,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -261,7 +262,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -326,7 +328,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -393,7 +396,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -574,7 +578,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -636,7 +641,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -698,7 +704,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -765,7 +772,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -836,7 +844,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { @@ -1344,7 +1353,8 @@ Response: "Receipt": { "ExitCode": 0, "Return": "Ynl0ZSBhcnJheQ==", - "GasUsed": 9 + "GasUsed": 9, + "EventsRoot": null }, "TipSetKey": [ { diff --git a/venus-shared/compatible-checks/api-checksum.txt b/venus-shared/compatible-checks/api-checksum.txt index fe6d4f16bf..be9fd14e4c 100644 --- a/venus-shared/compatible-checks/api-checksum.txt +++ b/venus-shared/compatible-checks/api-checksum.txt @@ -232,6 +232,7 @@ api.FullNode: ChainExport: In=4, Out=2, CheckSum=aaf98926e0ba36ec808a96de76a3cd98 ChainGetBlock: In=2, Out=2, CheckSum=0d2bba23d84a51413bbbebe218dcbcf9 ChainGetBlockMessages: In=2, Out=2, CheckSum=944437b34bb952bf3d50aa6415c9e0d3 + ChainGetEvents: In=2, Out=2, CheckSum=bc5a40732c7568871ff76ba8359f39a7 ChainGetGenesis: In=1, Out=2, CheckSum=6d1e4c4d8184dc8d645a56278f14cfad ChainGetMessage: In=2, Out=2, CheckSum=d1c0ae931458a2a7b07de152ca3de558 ChainGetMessagesInTipset: In=2, Out=2, CheckSum=6c0bfa48ffcacdfa9dbed1b9e23ad88e @@ -295,15 +296,24 @@ api.FullNode: EthGetBlockTransactionCountByHash: In=2, Out=2, CheckSum=aea75f99eaccb878b97512a29568c204 EthGetBlockTransactionCountByNumber: In=2, Out=2, CheckSum=2c3bfb8fef7edce8563d84eab6e9bf4f EthGetCode: In=3, Out=2, CheckSum=cdfa3798431df16537bf990bfee6dbe1 + EthGetFilterChanges: In=2, Out=2, CheckSum=7900665c8164ddcc00b0b3934b35dc45 + EthGetFilterLogs: In=2, Out=2, CheckSum=7900665c8164ddcc00b0b3934b35dc45 + EthGetLogs: In=2, Out=2, CheckSum=e4d62fd3240fe04e452a06683a49cfe3 EthGetStorageAt: In=4, Out=2, CheckSum=e505cd577c7257ac17fe6f48e5ebbd42 - EthGetTransactionByBlockHashAndIndex: In=3, Out=2, CheckSum=13509ac07867df1e4009e81b23765a42 - EthGetTransactionByBlockNumberAndIndex: In=3, Out=2, CheckSum=6fdf4dad9476e44749e4e5308bd28312 - EthGetTransactionByHash: In=2, Out=2, CheckSum=8b646987054551f0bf8ccf342d4d0a93 + EthGetTransactionByBlockHashAndIndex: In=3, Out=2, CheckSum=35fd0ffaa59afd599520dd3ed67a6527 + EthGetTransactionByBlockNumberAndIndex: In=3, Out=2, CheckSum=2c5c65acee5e71e01e46588db4a35bf9 + EthGetTransactionByHash: In=2, Out=2, CheckSum=755c3f781b7b3b6ee99da45260296c3f EthGetTransactionCount: In=3, Out=2, CheckSum=be1148526dd6b62c4f74ce21c9b6585e EthGetTransactionReceipt: In=2, Out=2, CheckSum=af6d9dda90fdb0f9427498580b9481a6 EthMaxPriorityFeePerGas: In=1, Out=2, CheckSum=e2f5588dddfc36a9cdef0fad6f4db93e + EthNewBlockFilter: In=1, Out=2, CheckSum=0b236ca49b91eef3180d6b4082640f0f + EthNewFilter: In=2, Out=2, CheckSum=bb78bd1380d703c64ed4573a220daea0 + EthNewPendingTransactionFilter: In=1, Out=2, CheckSum=0b236ca49b91eef3180d6b4082640f0f EthProtocolVersion: In=1, Out=2, CheckSum=442f3dc12ea5a22b7b8fea633069692a EthSendRawTransaction: In=2, Out=2, CheckSum=f63e0b205164d628bc8022b6d5a496f5 + EthSubscribe: In=3, Out=2, CheckSum=35dfe46f4359c36709be0b8825a699d6 + EthUninstallFilter: In=2, Out=2, CheckSum=eaa6a477ffaae115413457bbdb11e339 + EthUnsubscribe: In=2, Out=2, CheckSum=eaa6a477ffaae115413457bbdb11e339 GasEstimateFeeCap: In=4, Out=2, CheckSum=0fcac02de1d21c9ac6e10696a6499eba GasEstimateGasLimit: In=3, Out=2, CheckSum=4d1bd57eef0ee90d4c2e89f097d0604d GasEstimateGasPremium: In=5, Out=2, CheckSum=550724ed37e2fdaa64e55147e82214b1 diff --git a/venus-shared/compatible-checks/api-diff.txt b/venus-shared/compatible-checks/api-diff.txt index 4096fc76fe..999675ed1e 100644 --- a/venus-shared/compatible-checks/api-diff.txt +++ b/venus-shared/compatible-checks/api-diff.txt @@ -119,6 +119,7 @@ github.com/filecoin-project/venus/venus-shared/api/chain/v1.FullNode <> github.c + BlockTime - ChainBlockstoreInfo - ChainCheckBlockstore + - ChainGetEvents - ChainGetNode + ChainGetReceipts + ChainList @@ -156,6 +157,16 @@ github.com/filecoin-project/venus/venus-shared/api/chain/v1.FullNode <> github.c + Concurrent - CreateBackup - Discover + - EthGetFilterChanges + - EthGetFilterLogs + - EthGetLogs + > EthGetTransactionReceipt {[func(context.Context, types.EthHash) (*types.EthTxReceipt, error) <> func(context.Context, ethtypes.EthHash) (*api.EthTxReceipt, error)] base=func out type: #0 input; nested={[*types.EthTxReceipt <> *api.EthTxReceipt] base=pointed type; nested={[types.EthTxReceipt <> api.EthTxReceipt] base=struct field; nested={[types.EthTxReceipt <> api.EthTxReceipt] base=exported fields count: 14 != 15; nested=nil}}}} + - EthNewBlockFilter + - EthNewFilter + - EthNewPendingTransactionFilter + - EthSubscribe + - EthUninstallFilter + - EthUnsubscribe + GasBatchEstimateMessageGas > GasEstimateMessageGas {[func(context.Context, *internal.Message, *types.MessageSendSpec, types.TipSetKey) (*internal.Message, error) <> func(context.Context, *types.Message, *api.MessageSendSpec, types.TipSetKey) (*types.Message, error)] base=func in type: #2 input; nested={[*types.MessageSendSpec <> *api.MessageSendSpec] base=pointed type; nested={[types.MessageSendSpec <> api.MessageSendSpec] base=struct field; nested={[types.MessageSendSpec <> api.MessageSendSpec] base=exported fields count: 3 != 2; nested=nil}}}} + GetActor diff --git a/venus-shared/utils/method_map_test.go b/venus-shared/utils/method_map_test.go index b926eaa8a0..4bbb06d5a8 100644 --- a/venus-shared/utils/method_map_test.go +++ b/venus-shared/utils/method_map_test.go @@ -57,7 +57,7 @@ func TestMethodMap(t *testing.T) { // 没有把 v10 actor注入,等注入后移除 func skipEvmActor(name string) bool { - if name == manifest.EamKey || name == manifest.EvmKey || name == manifest.EmbryoKey { + if name == manifest.EamKey || name == manifest.EvmKey || name == manifest.EmbryoKey || name == manifest.EthAccountKey { return true } return false