diff --git a/CHANGELOG.md b/CHANGELOG.md index c5eaa60..1664e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## v0.4.0 + +* 升级 venus-auth 版本到 v1.10.0 +* 升级 go-jsonrpc 版本到 v0.1.7 +* 升级 lotus 版本到 v1.20.0 + ## v0.4.0-rc3 * 支持 MpoolBatchPushUntrusted [[#37](https://github.com/ipfs-force-community/chain-co/pull/37)] diff --git a/api/api.go b/api/api.go index e32a870..8293a7a 100644 --- a/api/api.go +++ b/api/api.go @@ -390,6 +390,8 @@ type Proxy interface { EthAccounts(ctx context.Context) ([]ethtypes.EthAddress, error) //perm:read // EthAddressToFilecoinAddress converts an EthAddress into an f410 Filecoin Address EthAddressToFilecoinAddress(ctx context.Context, ethAddress ethtypes.EthAddress) (address.Address, error) //perm:read + // FilecoinAddressToEthAddress converts an f410 or f0 Filecoin Address to an EthAddress + FilecoinAddressToEthAddress(ctx context.Context, filecoinAddress address.Address) (ethtypes.EthAddress, error) //perm:read // EthBlockNumber returns the height of the latest (heaviest) TipSet EthBlockNumber(ctx context.Context) (ethtypes.EthUint64, error) //perm:read // EthGetBlockTransactionCountByNumber returns the number of messages in the TipSet diff --git a/extern/filecoin-ffi b/extern/filecoin-ffi index 20f104e..1bc8bf8 160000 --- a/extern/filecoin-ffi +++ b/extern/filecoin-ffi @@ -1 +1 @@ -Subproject commit 20f104e88065aae59fd212d64be5bed108604e78 +Subproject commit 1bc8bf8b482b2ef34cbce17bfc3a7ec68c047461 diff --git a/go.mod b/go.mod index 2e379f5..be1dbf4 100644 --- a/go.mod +++ b/go.mod @@ -9,9 +9,9 @@ require ( github.com/filecoin-project/go-data-transfer v1.15.2 github.com/filecoin-project/go-fil-markets v1.25.2 github.com/filecoin-project/go-jsonrpc v0.2.1 - github.com/filecoin-project/go-state-types v0.10.0-rc3 - github.com/filecoin-project/lotus v1.18.0 - github.com/filecoin-project/venus-auth v1.10.0-rc2 + github.com/filecoin-project/go-state-types v0.10.0 + github.com/filecoin-project/lotus v1.20.0 + github.com/filecoin-project/venus-auth v1.10.0 github.com/golang/mock v1.6.0 github.com/google/uuid v1.3.0 github.com/hashicorp/go-multierror v1.1.1 @@ -228,6 +228,6 @@ require ( replace github.com/filecoin-project/filecoin-ffi => ./extern/filecoin-ffi -replace github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.7-0.20230220074347-8db78dbc20d4 +replace github.com/filecoin-project/go-jsonrpc => github.com/ipfs-force-community/go-jsonrpc v0.1.7 -replace github.com/filecoin-project/lotus => github.com/ipfs-force-community/lotus v0.8.1-0.20230221011603-a90921ed8a62 +replace github.com/filecoin-project/lotus => github.com/ipfs-force-community/lotus v0.8.1-0.20230302073406-b8eb89bc51bc diff --git a/go.sum b/go.sum index 87d3740..db9141d 100644 --- a/go.sum +++ b/go.sum @@ -385,8 +385,8 @@ github.com/filecoin-project/go-state-types v0.1.0/go.mod h1:ezYnPf0bNkTsDibL/psS github.com/filecoin-project/go-state-types v0.1.6/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.8/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= github.com/filecoin-project/go-state-types v0.1.10/go.mod h1:UwGVoMsULoCK+bWjEdd/xLCvLAQFBC7EDT477SKml+Q= -github.com/filecoin-project/go-state-types v0.10.0-rc3 h1:qExCc2swTe5ndsiu9dEoMqIwppjuTNRbsAFgpzHnHbc= -github.com/filecoin-project/go-state-types v0.10.0-rc3/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= +github.com/filecoin-project/go-state-types v0.10.0 h1:vsSThZIaPmOxNGG59+8D/HnlWRtlbdOjduH6ye+v8f0= +github.com/filecoin-project/go-state-types v0.10.0/go.mod h1:aLIas+W8BWAfpLWEPUOGMPBdhcVwoCG4pIQSQk26024= github.com/filecoin-project/go-statemachine v0.0.0-20200925024713-05bd7c71fbfe/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v0.0.0-20200925172917-aaed5359be39/go.mod h1:FGwQgZAt2Gh5mjlwJUlVB62JeYdo+if0xWxSEfBD9ig= github.com/filecoin-project/go-statemachine v1.0.2 h1:421SSWBk8GIoCoWYYTE/d+qCWccgmRH0uXotXRDjUbc= @@ -429,8 +429,8 @@ github.com/filecoin-project/storetheindex v0.4.30-0.20221114113647-683091f8e893 github.com/filecoin-project/test-vectors/schema v0.0.5/go.mod h1:iQ9QXLpYWL3m7warwvK1JC/pTri8mnfEmKygNDqqY6E= github.com/filecoin-project/venus v0.9.2-0.20210331052540-ca4ea7bab5fa/go.mod h1:9IY4iNo5At3GMBUNa8we3aGL7zM3cFUNxy2rMpb86C0= github.com/filecoin-project/venus v0.9.5/go.mod h1:ol4DC0omgbpszB6UNJB92zT0QfAkux974U7aiW89XvI= -github.com/filecoin-project/venus-auth v1.10.0-rc2 h1:mC2kRcUmXaL2nPky8iiogFjrygMTUXGXHjvEV9msPgk= -github.com/filecoin-project/venus-auth v1.10.0-rc2/go.mod h1:bJT0owiiQfQq7u8QBpIf22JHNRZdsx9rAr4wMEsg+ds= +github.com/filecoin-project/venus-auth v1.10.0 h1:0V5R36HIvLKRFJQjKkW0tjYazgHkDW/gmjwuEtKL1SA= +github.com/filecoin-project/venus-auth v1.10.0/go.mod h1:MoirCIFdK8FNIFXpBbgF4xhRsjGi4KHHfW1EF6iAwZ8= github.com/filecoin-project/venus-sealer v1.0.3/go.mod h1:6cErhac2TkfheD/ii65kaZJYK2i5sY37ys3cGmfnfTA= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe1ma7Lr6yG6/rjvM3emb6yoL7xLFzcVQ= @@ -767,10 +767,10 @@ github.com/influxdata/influxdb1-client v0.0.0-20190402204710-8ff2fc3824fc/go.mod github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839 h1:W9WBk7wlPfJLvMCdtV4zPulc4uCPrlywQOmbFOhgQNU= github.com/influxdata/line-protocol v0.0.0-20200327222509-2487e7298839/go.mod h1:xaLFMmpvUxqXtVkUJfg9QmT88cDaCJ3ZKgdZ78oO8Qo= -github.com/ipfs-force-community/go-jsonrpc v0.1.7-0.20230220074347-8db78dbc20d4 h1:iu/3irYevdNpdc0B/gRi1vuS3+lRn+6Ro9G0FeBiAfE= -github.com/ipfs-force-community/go-jsonrpc v0.1.7-0.20230220074347-8db78dbc20d4/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= -github.com/ipfs-force-community/lotus v0.8.1-0.20230221011603-a90921ed8a62 h1:S9/hDsdFd9eezkjRNn57QyhqWP1Ghdio3FMymudf6/I= -github.com/ipfs-force-community/lotus v0.8.1-0.20230221011603-a90921ed8a62/go.mod h1:Zg+vso1Z4j2q+fzakzKWuQxAvkjsUQyrmRrMdRR2ZRM= +github.com/ipfs-force-community/go-jsonrpc v0.1.7 h1:e0ZTapGFhDY54j0QpRYN54Q3FHawUBQAM1KvXOzZtYY= +github.com/ipfs-force-community/go-jsonrpc v0.1.7/go.mod h1:jBSvPTl8V1N7gSTuCR4bis8wnQnIjHbRPpROol6iQKM= +github.com/ipfs-force-community/lotus v0.8.1-0.20230302073406-b8eb89bc51bc h1:UU7RalJoYtfIdPmEsSAG6+Z6DJSghhhYy6dIDtgXSVQ= +github.com/ipfs-force-community/lotus v0.8.1-0.20230302073406-b8eb89bc51bc/go.mod h1:AFS2+lFb5L233qtXSwTvvevnGy6/gxL4Gs8M6sWvTLY= github.com/ipfs-force-community/metrics v1.0.1-0.20211022060227-11142a08b729 h1:elS3KmzAMVrcZpmP2RMEjs9Zlwh6LfhJTfYQdj4TREs= github.com/ipfs-force-community/metrics v1.0.1-0.20211022060227-11142a08b729/go.mod h1:mn40SioMuKtjmRumHFy/fJ26Pn028XuDjUJE9dorjyw= github.com/ipfs-force-community/venus-auth v0.0.0-20210409095239-6767c8e7ac9f/go.mod h1:1jzX/6nT1UiBC0p2BuA1ujKFnZwPndZhmOB89Nemd+w= diff --git a/proxy/proxy.go b/proxy/proxy.go index f44c17b..b750db0 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -484,6 +484,15 @@ func (p *Proxy) EthUnsubscribe(in0 context.Context, in1 ethtypes.EthSubscription return cli.EthUnsubscribe(in0, in1) } +func (p *Proxy) FilecoinAddressToEthAddress(in0 context.Context, in1 address.Address) (out0 ethtypes.EthAddress, err error) { + cli, err := p.Select(types.EmptyTSK) + if err != nil { + err = fmt.Errorf("api FilecoinAddressToEthAddress %v", err) + return + } + return cli.FilecoinAddressToEthAddress(in0, in1) +} + func (p *Proxy) GasBatchEstimateMessageGas(in0 context.Context, in1 []*api1.EstimateMessage, in2 uint64, in3 types.TipSetKey) (out0 []*api1.EstimateResult, err error) { cli, err := p.Select(in3) if err != nil { diff --git a/version/version.go b/version/version.go index e69dbdf..04ef155 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,5 @@ package version -var Version = "0.4.0-rc3" +var Version = "0.4.0" var CurrentCommit string